Skip to content

Commit

Permalink
fix: fix check issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Aug 20, 2024
1 parent 32183cc commit 9beb9f9
Show file tree
Hide file tree
Showing 32 changed files with 1,451 additions and 1,328 deletions.
11 changes: 8 additions & 3 deletions docs/extensions/bridge/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Let's say that you want to make a command that is both a Slash Command and a Pre

This is where the `ext.bridge` module comes in. It allows you to use one callback to make both a Slash Command and a Prefixed Command.


### Example Usage

```python
Expand All @@ -45,6 +44,7 @@ bot.run("TOKEN")
hello
</DiscordInteraction>
</div>

Hello!
</DiscordMessage>

Expand All @@ -58,6 +58,7 @@ bot.run("TOKEN")
!hello
</DiscordInteraction>
</div>

Hello!
</DiscordMessage>
</DiscordComponent>
Expand Down Expand Up @@ -101,6 +102,7 @@ The cog will automatically split the Bridge Command into their Slash Command and
hello
</DiscordInteraction>
</div>

Hello!
</DiscordMessage>

Expand All @@ -114,6 +116,7 @@ The cog will automatically split the Bridge Command into their Slash Command and
!hello
</DiscordInteraction>
</div>

Hello!
</DiscordMessage>

Expand All @@ -123,6 +126,7 @@ The cog will automatically split the Bridge Command into their Slash Command and
bye
</DiscordInteraction>
</div>

Bye!
</DiscordMessage>

Expand All @@ -136,6 +140,7 @@ The cog will automatically split the Bridge Command into their Slash Command and
!bye
</DiscordInteraction>
</div>

Bye!
</DiscordMessage>
</DiscordComponent>
Expand All @@ -144,8 +149,6 @@ The cog will automatically split the Bridge Command into their Slash Command and

You can defer if you want to communicate to the user that your bot is busy processing the command. This is done by using `ctx.defer()`. For the Slash Command implementation, `ctx.defer()` calls the function that gives out a "Bot is thinking" message. For the Prefixed Command implementation, `ctx.defer()` enables the typing indicator.

<!-- TODO: Add example images of deferring at work -->

### Options

Options are pretty straightforward. You just specify them like you do with prefixed commands, and you're all set!
Expand Down Expand Up @@ -173,6 +176,7 @@ bot.run("TOKEN")
sum
</DiscordInteraction>
</div>

4
</DiscordMessage>

Expand All @@ -186,6 +190,7 @@ bot.run("TOKEN")
!sum 2 2
</DiscordInteraction>
</div>

4
</DiscordMessage>
</DiscordComponent>
46 changes: 22 additions & 24 deletions docs/extensions/commands/groups.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: Command Groups
---

---
title: Command Groups
---

Command groups are a way to create subcommands for your commands. For example, `!afk set` or `!afk
remove`.

## Syntax

Creating a command group is very simple.

```python title="Command Groups Example"
remove`.

## Syntax

Creating a command group is very simple.

```python title="Command Groups Example"
import discord
from discord.ext import commands

Expand Down Expand Up @@ -39,18 +39,16 @@ async def add(ctx, a: int, b: int):

@math.command()
async def subtract(ctx, a: int, b: int):
...
```

...
```

To create a command group, the command's decorator must be `@bot.group`. Once you have a command with
that decorator, you can use `@function.command()`, such as `@math.command()`. Now, you have subcommand
groups!

<!-- Waiting for slash command groups in Pycord -->

:::info Related Topics

- [Prefixed Commands](./prefixed-commands.mdx)
- [Cogs](../../popular-topics/cogs)

:::
groups!

:::info Related Topics

* [Prefixed Commands](./prefixed-commands.mdx)
* [Cogs](../../popular-topics/cogs)

:::
Loading

0 comments on commit 9beb9f9

Please sign in to comment.