Skip to content
Merged

prod #270

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
07f6bc1
chore(deps): Bump sass from 1.55.0 to 1.56.0 (#250)
dependabot[bot] Nov 7, 2022
b0d3661
chore(deps): Bump actions/checkout from 2 to 3 (#251)
dependabot[bot] Nov 7, 2022
25c31f5
chore(deps): Bump loader-utils from 2.0.2 to 2.0.3
dependabot[bot] Nov 7, 2022
bc3d2a6
Merge branch 'main' into dependabot/npm_and_yarn/loader-utils-2.0.3
Lulalaby Nov 7, 2022
d3d619d
Merge pull request #252 from Pycord-Development/dependabot/npm_and_ya…
Lulalaby Nov 7, 2022
757bd52
chore(deps): Bump loader-utils from 2.0.3 to 2.0.4 (#257)
dependabot[bot] Nov 19, 2022
0434ded
chore(deps): Bump sass from 1.56.0 to 1.56.1 (#255)
dependabot[bot] Nov 19, 2022
2984867
chore(deps): Bump @matteusan/sentro from 0.1.23 to 0.1.25 (#256)
dependabot[bot] Nov 19, 2022
6f9291d
chore(deps): Bump webpack from 5.74.0 to 5.75.0 (#254)
dependabot[bot] Nov 19, 2022
58cae22
Add autocomplete example
Nzii3 Nov 22, 2022
0d4a3ba
fix: missing "
Lulalaby Nov 29, 2022
8e31c90
Merge pull request #258 from Nzii3/patch-1
Lulalaby Nov 29, 2022
0c7b565
chore(deps): Bump sass from 1.56.1 to 1.56.2 (#262)
dependabot[bot] Dec 15, 2022
1361be1
chore(deps-dev): Bump typescript from 4.8.4 to 4.9.4 (#263)
dependabot[bot] Dec 15, 2022
bfce44d
chore(deps-dev): Bump remark-mdx from 2.1.5 to 2.2.1
dependabot[bot] Dec 19, 2022
321c720
chore(deps): Bump sass from 1.56.2 to 1.57.1
dependabot[bot] Dec 26, 2022
38121d4
Merge pull request #267 from Pycord-Development/dependabot/npm_and_ya…
Lulalaby Dec 26, 2022
31bdfd9
chore(deps): Bump json5 from 2.2.1 to 2.2.3
dependabot[bot] Jan 8, 2023
df68901
chore(deps): Bump docusaurus-plugin-sass from 0.2.2 to 0.2.3
dependabot[bot] Jan 9, 2023
6c7ff7c
Merge pull request #268 from Pycord-Development/dependabot/npm_and_ya…
Lulalaby Jan 10, 2023
408c52c
Merge pull request #269 from Pycord-Development/dependabot/npm_and_ya…
Lulalaby Jan 10, 2023
ce365cf
Merge pull request #265 from Pycord-Development/dependabot/npm_and_ya…
Lulalaby Jan 10, 2023
5ee7b71
Update branding
Lulalaby Jan 12, 2023
c5f7422
Merge branch 'production' into main
Lulalaby Jan 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
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 @@ -15,7 +15,7 @@ jobs:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
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 @@ -299,7 +299,7 @@ import random
async def gtn(ctx, guess:int):
number = random.randint(1, 10)
if guess == number:
await ctx.send("You guessed it!)
await ctx.send("You guessed it!")
else:
await ctx.send("Nope! Better luck next time :)")
```
Expand Down
36 changes: 36 additions & 0 deletions docs/interactions/application-commands/slash-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,42 @@ bot.run("TOKEN")
</TabItem>
</Tabs>

## Autocomplete
Discord's autocomplete allows developers to determine option choices that are used in a slash command option. By defining a function, you can do this.

```py
async def get_animal_types(ctx: discord.AutocompleteContext):
"""
Here we will check if 'ctx.options['animal_type']' is and check if it's a marine or land animal and return specific option choices
"""
animal_type = ctx.options['animal_type']
if animal_type == 'Marine':
return ['Whale', 'Shark', 'Fish', 'Octopus', 'Turtle']
else: # is land animal
return ['Snake', 'Wolf', 'Lizard', 'Lion', 'Bird']

@bot.slash_command(name="animal")
async def animal_command(ctx: discord.ApplicationContext, animal_type: discord.Option(str, choices=['Marine', 'Land']), animal: discord.Option(str, autocomplete=discord.utils.basic_autocomplete(get_animals)):
await ctx.respond(f'You picked an animal type of `{animal_type}` that led you to pick `{animal}`!')
```

<DiscordComponent>
<DiscordMessage profile="robocord">
<div slot="interactions">
<DiscordInteraction profile="bob" command>
animal
</DiscordInteraction>
</div>
You picked an animal type of <code>Marine</code> that led you to pick <code>Shark</code>!
</DiscordMessage>
</DiscordComponent>

:::warning

Autocomplete can **only** be used with slash commands.

:::

:::info Related Topics

- [Interactions Index](../../interactions)
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
"@docusaurus/core": "2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@easyops-cn/docusaurus-search-local": "0.27.1",
"@matteusan/sentro": "0.1.23",
"@matteusan/sentro": "0.1.25",
"@mdx-js/react": "1.6.22",
"@types/react": "17.0.2",
"clsx": "1.2.1",
"discord-message-components": "https://gitpkg.now.sh/Pycord-Development/discord-message-components?aa468ada9b2b52986ae0aee4051660713c1e9095&scripts.postinstall=yarn%20install%20--ignore-scripts%20%26%26%20node%20node_modules%2Fesbuild%2Finstall.js%20%26%26yarn%20build%3Amarkdown%20%26%26%20yarn%20build%3Acore%20%26%26%20yarn%20build%3Areact",
"docusaurus-plugin-sass": "0.2.2",
"docusaurus-plugin-sass": "0.2.3",
"prism-react-renderer": "1.3.5",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-twemoji": "^0.5.0",
"sass": "1.55.0",
"webpack": "^5.74.0",
"sass": "1.57.1",
"webpack": "^5.75.0",
"yarn": "^1.22.19"
},
"devDependencies": {
Expand All @@ -51,10 +51,10 @@
"remark-comment": "^1.0.0",
"remark-frontmatter": "^4.0.1",
"remark-gfm": "^3.0.1",
"remark-mdx": "^2.1.5",
"remark-mdx": "^2.2.1",
"remark-preset-lint-consistent": "^5.1.1",
"remark-preset-lint-recommended": "^6.1.2",
"typescript": "4.8.4"
"typescript": "4.9.4"
},
"resolutions": {
"@types/react": "17.0.2"
Expand Down
Binary file modified static/img/favicon.ico
Binary file not shown.
Binary file modified static/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 30 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1970,10 +1970,10 @@
resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b"
integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==

"@matteusan/sentro@0.1.23":
version "0.1.23"
resolved "https://registry.yarnpkg.com/@matteusan/sentro/-/sentro-0.1.23.tgz#9554653f6d7eba7a6358c4dabb21b320b5bd4547"
integrity sha512-lVnDTSy/xjn7KHPkAXEGMCOHKSEY3OBMtbhfXxZu9ZcDWWbU57pttojVV/XMW7Wkr7BGOlM1hbBggzV22adTnA==
"@matteusan/sentro@0.1.25":
version "0.1.25"
resolved "https://registry.yarnpkg.com/@matteusan/sentro/-/sentro-0.1.25.tgz#626f8795ada5f31a746acad80c4c49cc6134d879"
integrity sha512-WADroUoOEnbGBij9ZSJkGbYp2yiNVi6UJZymJsSVyo1zuekM1pIzKF8+nI31SGt5wS3ChmOOR5+w1Z7c6jg9TQ==

"@mdx-js/mdx@^1.6.22":
version "1.6.22"
Expand Down Expand Up @@ -3962,10 +3962,10 @@ dns-packet@^5.2.2:
dependencies:
"@leichtgewicht/ip-codec" "^2.0.1"

docusaurus-plugin-sass@0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.2.tgz#9b7f8c6fbe833677064ec05b09b98d90b50be324"
integrity sha512-ZZBpj3PrhGpYE2kAnkZB9NRwy/CDi4rGun1oec6PYR8YvGzqxYGtXvLgHi6FFbu8/N483klk8udqyYMh6Ted+A==
docusaurus-plugin-sass@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.3.tgz#5b61f7e560d236cfc1531ed497ac32fc166fc5e2"
integrity sha512-FbaE06K8NF8SPUYTwiG+83/jkXrwHJ/Afjqz3SUIGon6QvFwSSoKOcoxGQmUBnjTOk+deUONDx8jNWsegFJcBQ==
dependencies:
sass-loader "^10.1.1"

Expand Down Expand Up @@ -5431,9 +5431,9 @@ json-schema-traverse@^1.0.0:
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==

json5@^2.0.0, json5@^2.1.2, json5@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
version "2.2.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==

jsonfile@^4.0.0:
version "4.0.0"
Expand Down Expand Up @@ -5535,9 +5535,9 @@ loader-runner@^4.2.0:
integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==

loader-utils@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129"
integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==
version "2.0.4"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c"
integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==
dependencies:
big.js "^5.2.2"
emojis-list "^3.0.0"
Expand Down Expand Up @@ -7967,10 +7967,10 @@ remark-mdx@1.6.22:
remark-parse "8.0.3"
unified "9.2.0"

remark-mdx@^2.1.5:
version "2.1.5"
resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-2.1.5.tgz#69b19ec42d30a289e0663c3fc7656ebdca0a8d8e"
integrity sha512-A8vw5s+BgOa968Irt8BO7DfWJTE0Fe7Ge3hX8zzDB1DnwMZTNdK6qF2IcFao+/7nzk1vSysKcFp+3ku4vhMpaQ==
remark-mdx@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-2.2.1.tgz#0d006436acf039b526c3b6b47ea4a44b3d544db7"
integrity sha512-R9wcN+/THRXTKyRBp6Npo/mcbGA2iT3N4G8qUqLA5pOEg7kBidHv8K2hHidCMYZ6DXmwK18umu0K4cicgA2PPQ==
dependencies:
mdast-util-mdx "^2.0.0"
micromark-extension-mdxjs "^1.0.0"
Expand Down Expand Up @@ -8223,10 +8223,10 @@ sass-loader@^10.1.1:
schema-utils "^3.0.0"
semver "^7.3.2"

sass@1.55.0:
version "1.55.0"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.55.0.tgz#0c4d3c293cfe8f8a2e8d3b666e1cf1bff8065d1c"
integrity sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==
sass@1.57.1:
version "1.57.1"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.57.1.tgz#dfafd46eb3ab94817145e8825208ecf7281119b5"
integrity sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==
dependencies:
chokidar ">=3.0.0 <4.0.0"
immutable "^4.0.0"
Expand Down Expand Up @@ -8898,10 +8898,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@4.8.4:
version "4.8.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
typescript@4.9.4:
version "4.9.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==

ua-parser-js@^0.7.30:
version "0.7.31"
Expand Down Expand Up @@ -9496,10 +9496,10 @@ webpack-sources@^3.2.2, webpack-sources@^3.2.3:
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==

webpack@^5.73.0, webpack@^5.74.0:
version "5.74.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980"
integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==
webpack@^5.73.0, webpack@^5.75.0:
version "5.75.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.75.0.tgz#1e440468647b2505860e94c9ff3e44d5b582c152"
integrity sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==
dependencies:
"@types/eslint-scope" "^3.7.3"
"@types/estree" "^0.0.51"
Expand Down