From d15210b2f6c7feca9860262073737d6a65a63874 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Thu, 24 Oct 2024 22:51:12 +0200 Subject: [PATCH] Revert "fix: try fixing failing ci" This reverts commit 0eb533d57af992de4f6b6f6b248ab2bea2ac1ac5. --- docs/extensions/commands/groups.mdx | 4 +- docs/extensions/commands/help-command.mdx | 48 +++++++++---------- .../extensions/commands/prefixed-commands.mdx | 14 +++--- docs/extensions/pages/paginator-basics.mdx | 38 +++++++-------- docs/extensions/pages/paginator-faq.mdx | 22 ++++----- docs/extensions/tasks/tasks.mdx | 8 ++-- .../creating-your-first-bot.mdx | 2 +- docs/getting-started/hosting-your-bot.mdx | 2 +- docs/getting-started/more-features.mdx | 8 ++-- .../application-commands/context-menus.mdx | 4 +- .../application-commands/localizations.mdx | 2 +- .../application-commands/slash-commands.mdx | 6 +-- docs/interactions/index.mdx | 24 +++++----- docs/interactions/ui-components/buttons.mdx | 8 ++-- docs/interactions/ui-components/dropdowns.mdx | 36 +++++++------- .../ui-components/modal-dialogs.mdx | 6 +-- docs/introduction.mdx | 38 +++++++-------- docs/more/contributing.mdx | 14 +++--- docs/more/git.mdx | 4 +- docs/popular-topics/cogs.mdx | 8 ++-- docs/popular-topics/intents.mdx | 4 +- docs/popular-topics/sharding.mdx | 4 +- docs/popular-topics/subclassing-bots.mdx | 8 ++-- docs/popular-topics/threads.mdx | 20 ++++---- docs/voice/index.mdx | 4 +- docs/voice/playing.mdx | 2 +- docs/voice/receiving.mdx | 2 +- 27 files changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/extensions/commands/groups.mdx b/docs/extensions/commands/groups.mdx index 419893f0..f35adee9 100644 --- a/docs/extensions/commands/groups.mdx +++ b/docs/extensions/commands/groups.mdx @@ -50,7 +50,7 @@ groups! :::info Related Topics -- [Prefixed Commands](./prefixed-commands.mdx) -- [Cogs](../../popular-topics/cogs) +- [Prefixed Commands](./prefixed-commands.mdx) +- [Cogs](../../popular-topics/cogs) ::: diff --git a/docs/extensions/commands/help-command.mdx b/docs/extensions/commands/help-command.mdx index 6da6c18b..7fe15791 100644 --- a/docs/extensions/commands/help-command.mdx +++ b/docs/extensions/commands/help-command.mdx @@ -26,8 +26,8 @@ Pycord bot. It is important to understand these two concepts before continuing. **Learning Resources**: -- [W3Schools - Python Subclassing](https://www.w3schools.com/python/python_classes.asp) -- [W3Schools - Python Inheritance](https://www.w3schools.com/python/python_inheritance.asp) +- [W3Schools - Python Subclassing](https://www.w3schools.com/python/python_classes.asp) +- [W3Schools - Python Inheritance](https://www.w3schools.com/python/python_inheritance.asp) ::: @@ -54,8 +54,8 @@ of making one with Pycord. Making a help command with subclassing and OOP will s There are two types of built-in help commands: -- [`DefaultHelpCommand`](https://docs.pycord.dev/en/stable/ext/commands/api.html#discord.ext.commands.DefaultHelpCommand) -- [`MinimalHelpCommand`](https://docs.pycord.dev/en/stable/ext/commands/api.html#discord.ext.commands.MinimalHelpCommand) +- [`DefaultHelpCommand`](https://docs.pycord.dev/en/stable/ext/commands/api.html#discord.ext.commands.DefaultHelpCommand) +- [`MinimalHelpCommand`](https://docs.pycord.dev/en/stable/ext/commands/api.html#discord.ext.commands.MinimalHelpCommand) `DefaultHelpCommand` is the command enabled by default. It isn't the best looking, but `MinimalHelpCommand` can help make it look a bit better. @@ -194,10 +194,10 @@ For this, we will subclass the `HelpCommand` class. There are 4 methods that we need to override: -- `HelpCommand.send_bot_help(mapping)` that gets called with `help` -- `HelpCommand.send_command_help(command)` that gets called with `help ` -- `HelpCommand.send_group_help(group)` that gets called with `help ` -- `HelpCommand.send_cog_help(cog)` that gets called with `help ` +- `HelpCommand.send_bot_help(mapping)` that gets called with `help` +- `HelpCommand.send_command_help(command)` that gets called with `help ` +- `HelpCommand.send_group_help(group)` that gets called with `help ` +- `HelpCommand.send_cog_help(cog)` that gets called with `help ` ### Bot Help @@ -219,27 +219,27 @@ bot.help_command = MyHelp() Let's go through the code. -- First, we create a new class called `MyHelp`. This class is a subclass of `HelpCommand`. +- First, we create a new class called `MyHelp`. This class is a subclass of `HelpCommand`. -- Next, we override the `send_bot_help` method. This method is responsible for sending the main help +- Next, we override the `send_bot_help` method. This method is responsible for sending the main help command to the user. -- We create an embed with the title "Help". +- We create an embed with the title "Help". -- We iterate through `mapping.items()`, which returns a list of tuples, the first element being the +- We iterate through `mapping.items()`, which returns a list of tuples, the first element being the cog and the second element being a list of commands. -- By using `self.get_command_signature(c)` we get the signature of the command, also known as the +- By using `self.get_command_signature(c)` we get the signature of the command, also known as the `parameters` or `arguments`. -- There is a chance that the cog is empty, so we use `if command_signatures:`. +- There is a chance that the cog is empty, so we use `if command_signatures:`. -- We get the name of the cog using `getattr(cog, "qualified_name", "No Category")`. This calls the +- We get the name of the cog using `getattr(cog, "qualified_name", "No Category")`. This calls the cog's attribute `qualified_name` which returns "No Category" if the cog has no name. -- We add a field to the embed with the name of the cog and the value of the command signatures. +- We add a field to the embed with the name of the cog and the value of the command signatures. -- Finally, we send the embed to the channel. +- Finally, we send the embed to the channel. Let's improve the code a little. @@ -289,10 +289,10 @@ bot.help_command = MyHelp() Let's quickly go through the code we haven't discussed yet. -- In line 3, we create an embed with a title the signature of the command (so that the title of the +- In line 3, we create an embed with a title the signature of the command (so that the title of the embed looks like ` [parameter]`), and a random color. -- In lines 4 and 5, we get the command's `help` description and add it to the embed. The help description +- In lines 4 and 5, we get the command's `help` description and add it to the embed. The help description of a command can be specified in the docstrings of a command function. For example: ```python @@ -302,7 +302,7 @@ of a command can be specified in the docstrings of a command function. For examp await ctx.send(f"Pong! {round(bot.latency * 1000)}ms") ``` -- Line 6 is shorthand for +- Line 6 is shorthand for ```python alias = command.aliases @@ -317,7 +317,7 @@ of a command can be specified in the docstrings of a command function. For examp A very helpful (but not well-known) Python shorthand! -- In line 7, we get the aliases of the command and add them to the embed. +- In line 7, we get the aliases of the command and add them to the embed. ### Cog Help @@ -472,8 +472,8 @@ Thanks to InterStella0 for making this guide amazing. :::info Related Topics -- [Subclassing Bots](../../Popular-Topics/subclassing-bots) -- [Prefixed Commands](./prefixed-commands) -- [Cogs](../../popular-topics/cogs) +- [Subclassing Bots](../../Popular-Topics/subclassing-bots) +- [Prefixed Commands](./prefixed-commands) +- [Cogs](../../popular-topics/cogs) ::: diff --git a/docs/extensions/commands/prefixed-commands.mdx b/docs/extensions/commands/prefixed-commands.mdx index 77f219a0..66496e7e 100644 --- a/docs/extensions/commands/prefixed-commands.mdx +++ b/docs/extensions/commands/prefixed-commands.mdx @@ -27,11 +27,11 @@ The syntax becomes a little more complicated when you want to have multiple comm disadvantages to this system. This is where the commands extension comes in. `ext.commands` has various advantages, such as: -- Simpler syntax -- Easier to use -- Easier to parse user input -- Comes with built-in help commands -- Comes with a built-in system for categorizing commands +- Simpler syntax +- Easier to use +- Easier to parse user input +- Comes with built-in help commands +- Comes with a built-in system for categorizing commands @@ -317,7 +317,7 @@ with `int(guess)`. :::info Related Topics -- [Command Groups](groups) -- [Rules and Common Practices](../../Getting-Started/rules-and-common-practices) +- [Command Groups](groups) +- [Rules and Common Practices](../../Getting-Started/rules-and-common-practices) ::: diff --git a/docs/extensions/pages/paginator-basics.mdx b/docs/extensions/pages/paginator-basics.mdx index 0a73e297..9dcce025 100644 --- a/docs/extensions/pages/paginator-basics.mdx +++ b/docs/extensions/pages/paginator-basics.mdx @@ -60,33 +60,33 @@ to send a message or response with the paginator's contents. #### Depending on what's being passed to the `pages` parameter, the behaviour of the paginator may differ: -- Passing a list of `PageGroup` objects will essentially treat each `PageGroup` as its own Paginator, with most +- Passing a list of `PageGroup` objects will essentially treat each `PageGroup` as its own Paginator, with most `Paginator` attributes able to be set independently for each `PageGroup`. - - Each `PageGroup` accepts its own `pages` parameter, which inherits the same behaviour as the `pages` parameter + - Each `PageGroup` accepts its own `pages` parameter, which inherits the same behaviour as the `pages` parameter of `Paginator`, except it cannot contain other `PageGroup` objects. -- If a page is a `Page` object, this will allow you to specify both the `discord.Message.content` and +- If a page is a `Page` object, this will allow you to specify both the `discord.Message.content` and `discord.Message.embeds` attributes for a page. - - **This is the preferred method of defining a page.** -- If a page is a string, this will be used for the `discord.Message.content` attribute. This type of page cannot have + - **This is the preferred method of defining a page.** +- If a page is a string, this will be used for the `discord.Message.content` attribute. This type of page cannot have any embeds. -- If a page is a list of embeds, this will be used for the `discord.Message.embeds` attribute. This type of page +- If a page is a list of embeds, this will be used for the `discord.Message.embeds` attribute. This type of page cannot have any message content. -- If a page is a list of lists of embeds, each parent list item will create a page containing all embeds from its +- If a page is a list of lists of embeds, each parent list item will create a page containing all embeds from its child list. This type of page cannot have any message content. #### Parameters for the `Paginator` class which have default values: -- `show_disabled` **:** `True` - - Show buttons that are disabled (i.e. can't be clicked) -- `author_check` **:** `True` - - Only the author can interact with the paginator. -- `timeout` **:** `180` *(seconds)* - - The paginator will time out and become inactive after this many seconds. -- `disable_on_timeout` **:** `True` - - If the paginator times out, it will be automatically disabled and all buttons will be unusable. -- `use_default_buttons` **:** `True` - - Use the default set of 4 buttons and a page indicator. -- `show_indicator` **:** `True` - - When using the default buttons, shows a middle 5th button with the current/total page numbers. +- `show_disabled` **:** `True` + - Show buttons that are disabled (i.e. can't be clicked) +- `author_check` **:** `True` + - Only the author can interact with the paginator. +- `timeout` **:** `180` *(seconds)* + - The paginator will time out and become inactive after this many seconds. +- `disable_on_timeout` **:** `True` + - If the paginator times out, it will be automatically disabled and all buttons will be unusable. +- `use_default_buttons` **:** `True` + - Use the default set of 4 buttons and a page indicator. +- `show_indicator` **:** `True` + - When using the default buttons, shows a middle 5th button with the current/total page numbers. **For other parameters that can be set on initialization, please check the [API Reference](https://docs.pycord.dev/en/stable/ext/pages/index.html#paginator)** diff --git a/docs/extensions/pages/paginator-faq.mdx b/docs/extensions/pages/paginator-faq.mdx index bf3b4ea6..d95c8c65 100644 --- a/docs/extensions/pages/paginator-faq.mdx +++ b/docs/extensions/pages/paginator-faq.mdx @@ -4,15 +4,15 @@ title: Paginator FAQ # Paginator FAQ -- **What's the difference between `Paginator.send()` and `Paginator.respond()`?** - - `Paginator.send()` is used to send a channel message (DMChannel or TextChannel) with the paginator. - - `Paginator.respond()` is used to send an interaction response (or followup) message with the paginator. +- **What's the difference between `Paginator.send()` and `Paginator.respond()`?** + - `Paginator.send()` is used to send a channel message (DMChannel or TextChannel) with the paginator. + - `Paginator.respond()` is used to send an interaction response (or followup) message with the paginator. -- **How can the bot send a paginator to a different destination than where it was invoked?** - - Use the `target` parameter in `Paginator.send()` or `Paginator.respond()`. - - You can also set the `target_message` parameter to control what's shown as a response where the paginator was originally invoked. - - For `Paginator.respond()`, this parameter is required if `target` is set, as an interaction requires being responded to. -- **How can I change the paginator's behavior without re-creating and re-sending it?** - - Use the `Paginator.update()` method. -- **How can I make the bot actually do something with the contents of a page?** - - Use the (upcoming) `Paginator.page_action()` method. \ No newline at end of file +- **How can the bot send a paginator to a different destination than where it was invoked?** + - Use the `target` parameter in `Paginator.send()` or `Paginator.respond()`. + - You can also set the `target_message` parameter to control what's shown as a response where the paginator was originally invoked. + - For `Paginator.respond()`, this parameter is required if `target` is set, as an interaction requires being responded to. +- **How can I change the paginator's behavior without re-creating and re-sending it?** + - Use the `Paginator.update()` method. +- **How can I make the bot actually do something with the contents of a page?** + - Use the (upcoming) `Paginator.page_action()` method. \ No newline at end of file diff --git a/docs/extensions/tasks/tasks.mdx b/docs/extensions/tasks/tasks.mdx index 0ad1b040..fea4db3e 100644 --- a/docs/extensions/tasks/tasks.mdx +++ b/docs/extensions/tasks/tasks.mdx @@ -88,11 +88,11 @@ These are all really useful, and they aren't the only parameters so if you want ### Attributes A task has the following attributes: -- `current_loop`: The current loop the task is on. -- `hours`, `minutes`, `seconds`: attributes that represent the time between each execution. -- `time`: A list of datetime.time objects that represent the times the task will run, returns `None` if no datetime +- `current_loop`: The current loop the task is on. +- `hours`, `minutes`, `seconds`: attributes that represent the time between each execution. +- `time`: A list of datetime.time objects that represent the times the task will run, returns `None` if no datetime objects were passed. -- `next_iteration`: A `datetime.datetime` object that represents the next time the next iteration of the task will +- `next_iteration`: A `datetime.datetime` object that represents the next time the next iteration of the task will run, can return `None` if the task stopped running. These attributes serve as a really powerful asset to get info about your loop. diff --git a/docs/getting-started/creating-your-first-bot.mdx b/docs/getting-started/creating-your-first-bot.mdx index 86801550..21472571 100644 --- a/docs/getting-started/creating-your-first-bot.mdx +++ b/docs/getting-started/creating-your-first-bot.mdx @@ -259,6 +259,6 @@ To learn more, read about Message Commands in our [interactions directory](../in :::info Related Topics -- [Prefixed Commands](../extensions/commands/prefixed-commands) +- [Prefixed Commands](../extensions/commands/prefixed-commands) ::: diff --git a/docs/getting-started/hosting-your-bot.mdx b/docs/getting-started/hosting-your-bot.mdx index 2a68677b..b5764508 100644 --- a/docs/getting-started/hosting-your-bot.mdx +++ b/docs/getting-started/hosting-your-bot.mdx @@ -104,6 +104,6 @@ a short time. :::info Related Topics -- [Creating Your First Bot](creating-your-first-bot) +- [Creating Your First Bot](creating-your-first-bot) ::: diff --git a/docs/getting-started/more-features.mdx b/docs/getting-started/more-features.mdx index a7904049..33d90f82 100644 --- a/docs/getting-started/more-features.mdx +++ b/docs/getting-started/more-features.mdx @@ -213,14 +213,14 @@ embed.set_image(url="https://example.com/link-to-my-banner.png") ``` In this section, we're adding unique items to the embed. These items are: -- Footer - With the [`set_footer()`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.Embed.set_footer) +- Footer - With the [`set_footer()`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.Embed.set_footer) method, you can set a small footer that holds a message. This has `text` and `icon_url` kwargs. -- Author - With the [`set_author`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.Embed.set_author) +- Author - With the [`set_author`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.Embed.set_author) method, you can set an author for the embed. This is a small text field at the top of the embed. This includes `name`, `url` and `icon_url` kwargs. -- Thumbnail - With the [`set_thumbnail`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.Embed.set_thumbnail) +- Thumbnail - With the [`set_thumbnail`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.Embed.set_thumbnail) method, you can set a small image to reside at the top-right of the embed. This has a single `url` kwarg. -- Image - With the [`set_image`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.Embed.set_image) +- Image - With the [`set_image`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.Embed.set_image) method, you can set an image to sit at the bottom of an embed. This has a single `url` kwarg. There are a lot more methods and attributes you can use to configure embeds. Here, we just covered the basics. Also, remember that all of these values are not necessary in an embed. An embed may only contain a few of these. For example, only a description, a title and a description, and so on. diff --git a/docs/interactions/application-commands/context-menus.mdx b/docs/interactions/application-commands/context-menus.mdx index b4ffeade..503f27f4 100644 --- a/docs/interactions/application-commands/context-menus.mdx +++ b/docs/interactions/application-commands/context-menus.mdx @@ -79,7 +79,7 @@ async def get_message_id(ctx, message: discord.Message): # message commands ret :::info Related Topics -- [Slash Commands](./slash-commands) -- [Interactions Index](../../interactions) +- [Slash Commands](./slash-commands) +- [Interactions Index](../../interactions) ::: diff --git a/docs/interactions/application-commands/localizations.mdx b/docs/interactions/application-commands/localizations.mdx index 43f13514..ab61e390 100644 --- a/docs/interactions/application-commands/localizations.mdx +++ b/docs/interactions/application-commands/localizations.mdx @@ -53,4 +53,4 @@ async def ping2(ctx, example: Option(str, "example", name_localizations={"en-GB" ``` -- [`Locales`](https://discord.com/developers/docs/reference#locales) - List of valid locales recognized by Discord +- [`Locales`](https://discord.com/developers/docs/reference#locales) - List of valid locales recognized by Discord diff --git a/docs/interactions/application-commands/slash-commands.mdx b/docs/interactions/application-commands/slash-commands.mdx index 785a3b73..5a6049d5 100644 --- a/docs/interactions/application-commands/slash-commands.mdx +++ b/docs/interactions/application-commands/slash-commands.mdx @@ -284,8 +284,8 @@ Autocomplete can **only** be used with slash commands. :::info Related Topics -- [Interactions Index](../../interactions) -- [Rules and Common Practices](../../getting-started/rules-and-common-practices) -- [Cogs](../../popular-topics/cogs) +- [Interactions Index](../../interactions) +- [Rules and Common Practices](../../getting-started/rules-and-common-practices) +- [Cogs](../../popular-topics/cogs) ::: diff --git a/docs/interactions/index.mdx b/docs/interactions/index.mdx index 9398649a..a8a19b93 100644 --- a/docs/interactions/index.mdx +++ b/docs/interactions/index.mdx @@ -19,21 +19,21 @@ Since then, Discord has added many types of Interactions, including: [**Application Commands**](https://discord.com/developers/docs/interactions/application-commands) -- [**Slash Commands**](https://discord.com/developers/docs/interactions/application-commands#slash-commands): +- [**Slash Commands**](https://discord.com/developers/docs/interactions/application-commands#slash-commands): Commands that can be used with the `/` prefix. -- **Context Menu Commands**: Commands that can be used from the right-click menu. - - [**User Commands**](https://discord.com/developers/docs/interactions/application-commands#user-commands): +- **Context Menu Commands**: Commands that can be used from the right-click menu. + - [**User Commands**](https://discord.com/developers/docs/interactions/application-commands#user-commands): Commands that can be used on a user by alt-clicking/selecting them. - - [**Message Commands**](https://discord.com/developers/docs/interactions/application-commands#message-commands): + - [**Message Commands**](https://discord.com/developers/docs/interactions/application-commands#message-commands): Commands that can be used on a message by alt-clicking/selecting it. [**UI Components**](https://discord.com/developers/docs/interactions/message-components) -- [**Buttons**](https://discord.com/developers/docs/interactions/message-components#buttons): +- [**Buttons**](https://discord.com/developers/docs/interactions/message-components#buttons): Buttons are attached to a message and can be clicked on to perform an action. -- [**Select Menus**](https://discord.com/developers/docs/interactions/message-components#select-menus): +- [**Select Menus**](https://discord.com/developers/docs/interactions/message-components#select-menus): Drop-down menus are used to select a number of options from a list. -- [**Modals**](https://discord.com/developers/docs/interactions/message-components#text-inputs): +- [**Modals**](https://discord.com/developers/docs/interactions/message-components#text-inputs): Form-like modals can be used to ask for input from a user. ## Application Commands @@ -69,11 +69,11 @@ Message Content intent. Using that as a reason will get your application denied. This is what a Slash Command looks like. Not too different from a prefix command, apart from the note telling you who invoked it. A Slash Command's fields can accept any of the following: -- Members -- Roles -- Channels -- Attachments -- Text +- Members +- Roles +- Channels +- Attachments +- Text Just about as good as it gets. diff --git a/docs/interactions/ui-components/buttons.mdx b/docs/interactions/ui-components/buttons.mdx index 1f4d6c59..ed84dfff 100644 --- a/docs/interactions/ui-components/buttons.mdx +++ b/docs/interactions/ui-components/buttons.mdx @@ -296,8 +296,8 @@ We highly recommend you learn about basic Python concepts like classes and inher **Resources**: -- [W3Schools's Guide to Python Classes & Objects](https://www.w3schools.com/python/python_classes.asp) -- [W3Schools's Guide to Python Inheritance](https://www.w3schools.com/python/python_inheritance.asp) +- [W3Schools's Guide to Python Classes & Objects](https://www.w3schools.com/python/python_classes.asp) +- [W3Schools's Guide to Python Inheritance](https://www.w3schools.com/python/python_inheritance.asp) #### Do buttons need any special permissions? @@ -309,7 +309,7 @@ That is up to you. Buttons do provide a cleaner interface for your bot and are e :::info Related Topics -- [Slash Commands](../application-commands/slash-commands) -- [Interactions Index](../../interactions) +- [Slash Commands](../application-commands/slash-commands) +- [Interactions Index](../../interactions) ::: diff --git a/docs/interactions/ui-components/dropdowns.mdx b/docs/interactions/ui-components/dropdowns.mdx index e9ef6d7f..a0f19579 100644 --- a/docs/interactions/ui-components/dropdowns.mdx +++ b/docs/interactions/ui-components/dropdowns.mdx @@ -81,24 +81,24 @@ about making your code do amazing things, while Pycord handles the rest! #### Select Menu Properties -- `select_type`: The type of select to create. This must be a [`discord.ComponentType`](https://docs.pycord.dev/en/stable/api/enums.html#discord.ComponentType) value. -- `channel_types`: A list of channel types that can be selected in the menu. This is only valid for selects of `select_type` [`discord.ComponentType.channel_select`](https://docs.pycord.dev/en/stable/api/enums.html#discord.ComponentType). -- `options`: A list of [`discord.SelectOption`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.SelectOption) values. These are the options that can be selected in this menu. -- `placeholder` is the placeholder text shown in the select menu if no option is selected. -- `custom_id`: The ID of the select menu that gets received during an interaction. It is recommended not to set this to anything unless you are trying to create a persistent view. -- `row`: The relative row this select menu belongs to. A Discord component can only have 5 rows. By default, items are arranged automatically into those 5 rows. If you’d like to control the relative positioning of the row then passing an index is advised. For example, row=1 will show up before row=2. Defaults to None, which is automatic ordering. The row number must be between 0 and 4 (i.e. zero indexed). -- `min_values`: The minimum number of items that must be chosen for this select menu. Defaults to 1 and must be between 1 and 25. -- `max_values`: The maximum number of items that must be chosen for this select menu. Defaults to 1 and must be between 1 and 25. -- `disabled`: Whether the select is disabled or not. Defaults to False. +- `select_type`: The type of select to create. This must be a [`discord.ComponentType`](https://docs.pycord.dev/en/stable/api/enums.html#discord.ComponentType) value. +- `channel_types`: A list of channel types that can be selected in the menu. This is only valid for selects of `select_type` [`discord.ComponentType.channel_select`](https://docs.pycord.dev/en/stable/api/enums.html#discord.ComponentType). +- `options`: A list of [`discord.SelectOption`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.SelectOption) values. These are the options that can be selected in this menu. +- `placeholder` is the placeholder text shown in the select menu if no option is selected. +- `custom_id`: The ID of the select menu that gets received during an interaction. It is recommended not to set this to anything unless you are trying to create a persistent view. +- `row`: The relative row this select menu belongs to. A Discord component can only have 5 rows. By default, items are arranged automatically into those 5 rows. If you’d like to control the relative positioning of the row then passing an index is advised. For example, row=1 will show up before row=2. Defaults to None, which is automatic ordering. The row number must be between 0 and 4 (i.e. zero indexed). +- `min_values`: The minimum number of items that must be chosen for this select menu. Defaults to 1 and must be between 1 and 25. +- `max_values`: The maximum number of items that must be chosen for this select menu. Defaults to 1 and must be between 1 and 25. +- `disabled`: Whether the select is disabled or not. Defaults to False. #### Select Option Properties In the `options` parameter, you pass a list of [`discord.SelectOption`](https://docs.pycord.dev/en/stable/api/data_classes.html#discord.SelectOption) values. This class also has a few parameters: -- `default` (whether the option is selected by default) -- `description` (an additional description, if any) -- `emoji` (a string or an emoji object, if any) -- `label` (the name displayed to users, can be up to 100 characters) -- `value` (a special value of the option, defaults to the label). +- `default` (whether the option is selected by default) +- `description` (an additional description, if any) +- `emoji` (a string or an emoji object, if any) +- `label` (the name displayed to users, can be up to 100 characters) +- `value` (a special value of the option, defaults to the label). ## Select Types @@ -325,8 +325,8 @@ We highly recommend you learn about basic Python concepts like classes and inher **Resources**: -- [W3Schools's Guide to Python Classes & Objects](https://www.w3schools.com/python/python_classes.asp) -- [W3Schools's Guide to Python Inheritance](https://www.w3schools.com/python/python_inheritance.asp) +- [W3Schools's Guide to Python Classes & Objects](https://www.w3schools.com/python/python_classes.asp) +- [W3Schools's Guide to Python Inheritance](https://www.w3schools.com/python/python_inheritance.asp) #### Do select menus need any special permissions? @@ -334,7 +334,7 @@ No new permissions are needed in the bot or in the server. :::info Related Topics -- [Slash Commands](../application-commands/slash-commands) -- [Interactions Index](../../interactions) +- [Slash Commands](../application-commands/slash-commands) +- [Interactions Index](../../interactions) ::: diff --git a/docs/interactions/ui-components/modal-dialogs.mdx b/docs/interactions/ui-components/modal-dialogs.mdx index bd585c77..d13c9447 100644 --- a/docs/interactions/ui-components/modal-dialogs.mdx +++ b/docs/interactions/ui-components/modal-dialogs.mdx @@ -100,8 +100,8 @@ long = 2 :::info Related Topics -- [Slash Commands](../application-commands/slash-commands) -- [Buttons](./buttons) -- [Interactions Index](../../interactions) +- [Slash Commands](../application-commands/slash-commands) +- [Buttons](./buttons) +- [Interactions Index](../../interactions) ::: diff --git a/docs/introduction.mdx b/docs/introduction.mdx index a21a895d..ca9447dd 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -10,19 +10,19 @@ Pycord is a modern, easy to use, feature-rich, and async ready API wrapper for D Pycord is an advanced and complex Python library. To take advantage of the full capabilities of Pycord, you will need to have a good understanding of Python. You should know the basics of Python and have an understanding of the following concepts: -- Variables -- Data Types -- Functions -- Packages -- Conditionals -- Loops -- Classes -- Object-Oriented Programming -- Inheritance -- Exception Handling -- Iterators -- Coroutines -- Async/Await +- Variables +- Data Types +- Functions +- Packages +- Conditionals +- Loops +- Classes +- Object-Oriented Programming +- Inheritance +- Exception Handling +- Iterators +- Coroutines +- Async/Await This list is not exhaustive, but it should give you a good idea of what you need to know to get started. @@ -32,12 +32,12 @@ When you see an ellipsis - that's the three dots - in this guide, it is a placeh Here are some good resources to get started or to freshen up your Python knowledge: -- [Official Beginner's Guide](https://wiki.python.org/moin/BeginnersGuide) -- [Official Tutorial](https://docs.python.org/3/tutorial/) -- [Automate the Boring Stuff, a free online book for complete beginners to programming](https://automatetheboringstuff.com/) -- [Learn Python in y Minutes, complete cheat sheet for people who know programming already](https://learnxinyminutes.com/docs/python3/) -- [Swaroopch's free Python book](http://python.swaroopch.com/) -- [Codeabbey, exercises for beginners](http://www.codeabbey.com/) +- [Official Beginner's Guide](https://wiki.python.org/moin/BeginnersGuide) +- [Official Tutorial](https://docs.python.org/3/tutorial/) +- [Automate the Boring Stuff, a free online book for complete beginners to programming](https://automatetheboringstuff.com/) +- [Learn Python in y Minutes, complete cheat sheet for people who know programming already](https://learnxinyminutes.com/docs/python3/) +- [Swaroopch's free Python book](http://python.swaroopch.com/) +- [Codeabbey, exercises for beginners](http://www.codeabbey.com/) ## Credits diff --git a/docs/more/contributing.mdx b/docs/more/contributing.mdx index f7b742df..fde3eaaf 100644 --- a/docs/more/contributing.mdx +++ b/docs/more/contributing.mdx @@ -16,8 +16,8 @@ import DiscordComponent from "@site/src/components/DiscordComponent"; This page outlines some of the basic syntax you need to know to contribute to the guide. We recommend you also check out: -- [Docusaurus's Docs](https://docusaurus.io/docs/) -- [Contributing Rules](https://github.com/Pycord-Development/guide/blob/master/.github/CONTRIBUTING.md) +- [Docusaurus's Docs](https://docusaurus.io/docs/) +- [Contributing Rules](https://github.com/Pycord-Development/guide/blob/master/.github/CONTRIBUTING.md) ## Info @@ -124,8 +124,8 @@ print("We can use code blocks like this.") You can add [links to other websites](https://pycord.dev). You can add images by adding ![alt text](@site/static/img/favicon.ico). -- You can create -- unordered lists like this +- You can create +- unordered lists like this 1. Or ordered lists 2. Like this @@ -174,9 +174,9 @@ This line is only separated by a single newline, so it's a separate line in the We can use emojis too! :joy: -- [x] We can have task lists too -- [ ] This is a task -- [ ] That's not done yet +- [x] We can have task lists too +- [ ] This is a task +- [ ] That's not done yet diff --git a/docs/more/git.mdx b/docs/more/git.mdx index e057f85c..4bd09ce7 100644 --- a/docs/more/git.mdx +++ b/docs/more/git.mdx @@ -11,8 +11,8 @@ Let's see how to install Git on different platforms. On Windows, Git can be installed via: -- [Git for Windows](https://gitforwindows.org) -- [Git Scm](https://git-scm.com/download/windows) +- [Git for Windows](https://gitforwindows.org) +- [Git Scm](https://git-scm.com/download/windows) ## Linux diff --git a/docs/popular-topics/cogs.mdx b/docs/popular-topics/cogs.mdx index 5377a6c3..28b34933 100644 --- a/docs/popular-topics/cogs.mdx +++ b/docs/popular-topics/cogs.mdx @@ -132,9 +132,9 @@ create a help command [here](../extensions/commands/help-command). :::info Related Topics -- [Creating a Help Command](../extensions/commands/help-command) -- [Rules and Common Practices](../getting-started/rules-and-common-practices) -- [Prefixed Commands](../extensions/commands/prefixed-commands) -- [Application Commands](../interactions#application-commands) +- [Creating a Help Command](../extensions/commands/help-command) +- [Rules and Common Practices](../getting-started/rules-and-common-practices) +- [Prefixed Commands](../extensions/commands/prefixed-commands) +- [Application Commands](../interactions#application-commands) ::: diff --git a/docs/popular-topics/intents.mdx b/docs/popular-topics/intents.mdx index fa850ded..aa004c80 100644 --- a/docs/popular-topics/intents.mdx +++ b/docs/popular-topics/intents.mdx @@ -56,7 +56,7 @@ Not enabling these intents doesn't mean you won't be able to ban users, but you :::info Related Topics -- [Sharding Bots](sharding) -- [Rules and Common Practices](../Getting-Started/rules-and-common-practices) +- [Sharding Bots](sharding) +- [Rules and Common Practices](../Getting-Started/rules-and-common-practices) ::: diff --git a/docs/popular-topics/sharding.mdx b/docs/popular-topics/sharding.mdx index c3d17197..b9af0fa0 100644 --- a/docs/popular-topics/sharding.mdx +++ b/docs/popular-topics/sharding.mdx @@ -42,7 +42,7 @@ big enough, and that's at _least_ 1,000 guilds. :::info Related Topics -- [Hosting your Bot](../Getting-Started/hosting-your-bot) -- [Rules and Common Practices](../Getting-Started/rules-and-common-practices) +- [Hosting your Bot](../Getting-Started/hosting-your-bot) +- [Rules and Common Practices](../Getting-Started/rules-and-common-practices) ::: diff --git a/docs/popular-topics/subclassing-bots.mdx b/docs/popular-topics/subclassing-bots.mdx index 82365651..e6e34c39 100644 --- a/docs/popular-topics/subclassing-bots.mdx +++ b/docs/popular-topics/subclassing-bots.mdx @@ -9,8 +9,8 @@ Subclassing is another popular way of creating Discord Bots. Here, you create a Subclassing is an intermediate python concept, so we recommend you learn about it before continuing. Some good resources are: -- [W3Schools's Guide to Python Classes & Objects](https://www.w3schools.com/python/python_classes.asp) -- [W3Schools's Guide to Python Inheritance](https://www.w3schools.com/python/python_inheritance.asp) +- [W3Schools's Guide to Python Classes & Objects](https://www.w3schools.com/python/python_classes.asp) +- [W3Schools's Guide to Python Inheritance](https://www.w3schools.com/python/python_inheritance.asp) ## Why Subclassing? @@ -107,7 +107,7 @@ So, should you subclass? There are no limitations you face if you decide to subc :::info Related Topics -- [Making a Help Command](../Extensions/Commands/help-command) -- [Rules and Common Practices](../Getting-Started/rules-and-common-practices) +- [Making a Help Command](../Extensions/Commands/help-command) +- [Rules and Common Practices](../Getting-Started/rules-and-common-practices) ::: diff --git a/docs/popular-topics/threads.mdx b/docs/popular-topics/threads.mdx index 23220b0e..b96f6957 100644 --- a/docs/popular-topics/threads.mdx +++ b/docs/popular-topics/threads.mdx @@ -55,17 +55,17 @@ await thread.delete() **Parameters** -- `name` (str) – The new name of the thread +- `name` (str) – The new name of the thread -- `archived` (bool) – Whether to archive the thread or not. +- `archived` (bool) – Whether to archive the thread or not. -- `locked` (bool) – Whether to lock the thread or not. +- `locked` (bool) – Whether to lock the thread or not. -- `invitable` (bool) – Whether non-moderators can add other non-moderators to this thread. Only available for private threads. +- `invitable` (bool) – Whether non-moderators can add other non-moderators to this thread. Only available for private threads. -- `auto_archive_duration` (int) – The new duration in minutes before a thread gets automatically archived for inactivity. Must be one of 60, 1440, 4320, or 10080. +- `auto_archive_duration` (int) – The new duration in minutes before a thread gets automatically archived for inactivity. Must be one of 60, 1440, 4320, or 10080. -- `slowmode_delay` (int) – Specifies the slow-mode rate limit for users in the thread, in seconds. A value of 0 disables slow-mode. The maximum value possible is 21600. +- `slowmode_delay` (int) – Specifies the slow-mode rate limit for users in the thread, in seconds. A value of 0 disables slow-mode. The maximum value possible is 21600. ```python title="Editing a Thread" thread = bot.get_channel(id) @@ -93,10 +93,10 @@ raised an exception: HTTPException: 400 Bad Request (error code: 10008): Unknown There could be multiple reasons, some of them being: -- The message does not exist -- The message already has a thread -- The message is in channel x, you are trying to start a thread in channel y. -- The message was deleted. +- The message does not exist +- The message already has a thread +- The message is in channel x, you are trying to start a thread in channel y. +- The message was deleted. :::info Related Topics diff --git a/docs/voice/index.mdx b/docs/voice/index.mdx index 8c037a5a..f56ca692 100644 --- a/docs/voice/index.mdx +++ b/docs/voice/index.mdx @@ -18,7 +18,7 @@ Opus is also a required library, but this comes with Pycord. Some hosts may not come with it, though, so remember to always check if required dependencies are installed. ::: -- [`FFmpeg`](https://ffmpeg.org) - used for sending/receiving files other than `.pcm` and `.wav` -- [`Pycord.Wavelink`](https://github.com/Pycord-Development/Pycord.Wavelink), +- [`FFmpeg`](https://ffmpeg.org) - used for sending/receiving files other than `.pcm` and `.wav` +- [`Pycord.Wavelink`](https://github.com/Pycord-Development/Pycord.Wavelink), [`Lavalink.py`](https://github.com/Devoxin/Lavalink.py), [`Wavelink`](https://github.com/PythonistaGuild/Wavelink) or any other Python LavaLink library for music playback. diff --git a/docs/voice/playing.mdx b/docs/voice/playing.mdx index 427b1f99..55e97bb6 100644 --- a/docs/voice/playing.mdx +++ b/docs/voice/playing.mdx @@ -143,6 +143,6 @@ it easy to make complex bots so that you can get even the most advanced of ideas :::info Related Topics -- [Rules and Common Practices](../getting-started/rules-and-common-practices) +- [Rules and Common Practices](../getting-started/rules-and-common-practices) ::: diff --git a/docs/voice/receiving.mdx b/docs/voice/receiving.mdx index bcae653b..bb0360d0 100644 --- a/docs/voice/receiving.mdx +++ b/docs/voice/receiving.mdx @@ -125,6 +125,6 @@ it easy to make complex bots so that you can get even the most advanced of ideas :::info Related Topics -- [Rules and Common Practices](../getting-started/rules-and-common-practices) +- [Rules and Common Practices](../getting-started/rules-and-common-practices) :::