get_desynced_commands() fix not working
Summary
this issue was apparently fixed in one of the latest commits but the same error occurs
Reproduction Steps
create a bot that uses sync_commands()
Minimal Reproducible Code
@commands.Cog.listener()
async def on_connect(self):
print(f"Logged on as\033[1;92m {self.client.user}")
await self.client.register_commands()
Expected Results
load commands correctly and expect the following line: cmd_vals = [val.get(opt, MISSING) for val in as_dict[check] if check in as_dict] to not error
Actual Results
the line still give the following error: KeyError: 'options' full traceback: Ignoring exception in on_connect Traceback (most recent call last): File "/bot-directory/venv/lib/python3.10/site-packages/discord/client.py", line 352, in _run_event await coro(*args, **kwargs) File "/bot-directory/venv/lib/python3.10/site-packages/discord/bot.py", line 1040, in on_connect await self.sync_commands() File "/bot-directory/venv/lib/python3.10/site-packages/discord/bot.py", line 552, in sync_commands registered_guild_commands[guild_id] = await self.register_commands( File "/bot-directory/venv/lib/python3.10/site-packages/discord/bot.py", line 419, in register_commands desynced = await self.get_desynced_commands(guild_id=guild_id) File "/bot-directory/venv/lib/python3.10/site-packages/discord/bot.py", line 285, in get_desynced_commands cmd_vals = [val.get(opt, MISSING) for val in as_dict[check] if check in as_dict] KeyError: 'options'
Intents
defaults, members, presences
System Information
- Python v3.10.1-final
- py-cord v2.0.0-beta
- py-cord pkg_resources: v2.0.0b4
- aiohttp v3.8.1
- system info: Linux 5.13.0-27-generic #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022
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
this appears to possibly be a something different and not a duplicate.
update: possibly a duplicate due to the other simular issue being re-opened
Can repro on v2.0.0b4 Debian 11.
Seems like beta 4 release fixed this.
Also can be reproduced on v2.0.0b4 Ubuntu 18.04 LTS.
this error no longer occurs for me on the latest commit
this is confirmed to be fixed in #941