Skip to content

Commit

Permalink
Merge branch 'main' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Oct 24, 2024
2 parents 3942aef + 902deb1 commit d4c3468
Show file tree
Hide file tree
Showing 49 changed files with 1,570 additions and 1,493 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@5cc54a75f9ad88159bb54046196d920e40e367a5
uses: codacy/codacy-analysis-cli-action@v4.4.5
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

The official Guide for Pycord, explaining Pycord's features and how to use them.

## NOTE
Currently deployed from https://github.com/Aiko-IT-Systems/pycord-guide/

## Purpose

The Guide is meant to serve as a professional guide to **all** of Pycord's features.
Expand Down
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 d4c3468

Please sign in to comment.