Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup! #473

Merged
merged 4 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 0 additions & 40 deletions .github/workflows/deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [18]
node-version: [22.6.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22.6.0
cache: yarn

- name: Install dependencies
Expand Down
18 changes: 15 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
plugins: [
[
'module-resolver',
{
root: ['./'],
alias: {
'@components': './src/components',
'@constants': './src/constants',
},
},
],
],
};
17 changes: 17 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
base_url: "https://pycord.crowdin.com"
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_API_TOKEN
Dismissed Show dismissed Hide dismissed

preserve_hierarchy: true

commit_message: "docs: Update translations"

export_languages: ["de", "ja", "fr", "it", "hi", "ko", "pt-BR", "es-ES", "zh-CN", "ru"]

files:
- source: /i18n/en/**/*
translation: /i18n/%two_letters_code%/**/%original_file_name%
- source: /docs/**/*
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%
- source: /src/pages/*
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-pages%original_file_name%
14 changes: 7 additions & 7 deletions docs/extensions/_category_.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"position": 5,
"label": "Extensions",
"link": {
"type": "generated-index"
}
}
{
"position": 5,
"label": "Extensions",
"link": {
"type": "generated-index"
}
}
6 changes: 3 additions & 3 deletions docs/extensions/bridge/_category_.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"label": "Bridge"
}
{
"label": "Bridge"
}
2 changes: 1 addition & 1 deletion docs/extensions/bridge/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "discord-message-components/packages/react";
import "discord-message-components/packages/react/dist/style.css";

import DiscordComponent from "../../../src/components/DiscordComponent";
import DiscordComponent from "@site/src/components/DiscordComponent";

## Concept

Expand Down
12 changes: 6 additions & 6 deletions docs/extensions/commands/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Commands",
"link": {
"type": "generated-index"
}
}
{
"label": "Commands",
"link": {
"type": "generated-index"
}
}
112 changes: 56 additions & 56 deletions docs/extensions/commands/groups.mdx
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
---
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"
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix='!')

@bot.group()
async def afk():
pass

@afk.command()
async def set():
...

@afk.command()
async def remove():
...

# Another command group

@bot.group(invoke_without_command=True) # Indicates if the group callback should begin parsing and invocation only if no subcommand was found.
async def math(ctx):
await ctx.send('Subcommand not found')

@math.command()
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)

:::
---
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"
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix='!')
@bot.group()
async def afk():
pass
@afk.command()
async def set():
...
@afk.command()
async def remove():
...
# Another command group
@bot.group(invoke_without_command=True) # Indicates if the group callback should begin parsing and invocation only if no subcommand was found.
async def math(ctx):
await ctx.send('Subcommand not found')
@math.command()
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)
:::
2 changes: 1 addition & 1 deletion docs/extensions/commands/help-command.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "discord-message-components/packages/react";
import "discord-message-components/packages/react/dist/style.css";

import DiscordComponent from "../../../src/components/DiscordComponent";
import DiscordComponent from "@site/src/components/DiscordComponent";

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/commands/prefixed-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "discord-message-components/packages/react";
import "discord-message-components/packages/react/dist/style.css";

import DiscordComponent from "../../../src/components/DiscordComponent";
import DiscordComponent from "@site/src/components/DiscordComponent";

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
Expand Down
12 changes: 6 additions & 6 deletions docs/extensions/pages/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Pages",
"link": {
"type": "generated-index"
}
}
{
"label": "Pages",
"link": {
"type": "generated-index"
}
}
36 changes: 18 additions & 18 deletions docs/extensions/pages/paginator-faq.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
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.

- **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. <!-- This refers to an upcoming `ext.pages` feature that has not yet been released. -->
---
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.
- **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.
6 changes: 3 additions & 3 deletions docs/extensions/tasks/_category_.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"label": "Tasks"
}
{
"label": "Tasks"
}
14 changes: 7 additions & 7 deletions docs/getting-started/_category_.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"position": 3,
"label": "Getting Started",
"link": {
"type": "generated-index"
}
}
{
"position": 3,
"label": "Getting Started",
"link": {
"type": "generated-index"
}
}
14 changes: 7 additions & 7 deletions docs/getting-started/creating-your-first-bot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ title: Creating Your First Bot
---

import {
DiscordButton,
DiscordButtons,
DiscordInteraction,
DiscordMessage,
DiscordMessages,
DiscordButton,
DiscordButtons,
DiscordInteraction,
DiscordMessage,
DiscordMessages,
} from "discord-message-components/packages/react";
import "discord-message-components/packages/react/dist/style.css";

import DiscordComponent from "../../src/components/DiscordComponent";
import DiscordComponent from "@site/src/components/DiscordComponent";

Excited to create your first bot? Once you [install Pycord](../installation.mdx), you can start right
away!
Expand Down 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)

:::
Loading
Loading