Skip to content

Commit

Permalink
Revert "fix: try fixing failing ci"
Browse files Browse the repository at this point in the history
This reverts commit 0eb533d.
  • Loading branch information
Lulalaby committed Oct 24, 2024
1 parent 0eb533d commit d15210b
Show file tree
Hide file tree
Showing 27 changed files with 170 additions and 170 deletions.
4 changes: 2 additions & 2 deletions docs/extensions/commands/groups.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

:::
48 changes: 24 additions & 24 deletions docs/extensions/commands/help-command.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

:::

Expand All @@ -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.

Expand Down Expand Up @@ -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 `<prefix>help`
- `HelpCommand.send_command_help(command)` that gets called with `<prefix>help <command>`
- `HelpCommand.send_group_help(group)` that gets called with `<prefix>help <group>`
- `HelpCommand.send_cog_help(cog)` that gets called with `<prefix>help <cog>`
- `HelpCommand.send_bot_help(mapping)` that gets called with `<prefix>help`
- `HelpCommand.send_command_help(command)` that gets called with `<prefix>help <command>`
- `HelpCommand.send_group_help(group)` that gets called with `<prefix>help <group>`
- `HelpCommand.send_cog_help(cog)` that gets called with `<prefix>help <cog>`

### Bot Help

Expand All @@ -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.

Expand Down Expand Up @@ -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 `<command> <parameter> [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
Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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)

:::
14 changes: 7 additions & 7 deletions docs/extensions/commands/prefixed-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

<Tabs>
<TabItem value="0" label="Using Events to Create Prefixed Commands" default>
Expand Down Expand Up @@ -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)

:::
38 changes: 19 additions & 19 deletions docs/extensions/pages/paginator-basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)**
Expand Down
22 changes: 11 additions & 11 deletions docs/extensions/pages/paginator-faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- **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.
8 changes: 4 additions & 4 deletions docs/extensions/tasks/tasks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/creating-your-first-bot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

:::
2 changes: 1 addition & 1 deletion docs/getting-started/hosting-your-bot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

:::
8 changes: 4 additions & 4 deletions docs/getting-started/more-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/interactions/application-commands/context-menus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

:::
2 changes: 1 addition & 1 deletion docs/interactions/application-commands/localizations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions docs/interactions/application-commands/slash-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

:::
24 changes: 12 additions & 12 deletions docs/interactions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
Loading

0 comments on commit d15210b

Please sign in to comment.