Slash Command Options not Updating
Summary
Updating Slash Command Options will not Update on Discord
Reproduction Steps
- Run the bot
- Update the command options
- Run the bot again
- Open discord and the command parameters do not update
Minimal Reproducible Code
import discord
bot = discord.Bot()
@bot.slash_command()
async def command(ctx, option : discord.Option(str, "an option description")):
await ctx.respond(f"{option}")
bot.run("t0k3n")
Expected Results
Slash Command options updating.
Actual Results
Slash Command options not updating.
Intents
None
System Information
python -m discord -v:
zsh: command not found: python
python3 -m discord -v:
- Python v3.10.5-final
- py-cord v2.0.0-final
- aiohttp v3.8.1
- system info: Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101
Checklist
- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.
Additional Context
Workarounds are to unregister the command completely and then re-register the command with the updated options.
Might be something to do with here: https://github.com/Pycord-Development/pycord/blob/cf5f6d2bcd5b9de2505a4a72ce552b1fc8dc6035/discord/bot.py#L119-L143
Instead of checking if the command's options have been updated, it is only checked if the command exists.
Status Update please @Pycord-Development/maintainers
@bot.slash_command() is not correct it requires the name parameter so @bot.slash_command(name='name')
@bot.slash_command()is not correct it requires the name parameter so@bot.slash_command(name='name')
@bot.slash_command() requires no parameters.
@plun1331 pardon me I misunderstood it for a commands.slash_command()
I tried to reproduce the code thought, I wasn't able too... any more debug info would be appreciated.