mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Fix some context menu commands not being registered in guild contexts
This happened when there weren't any application commands due to a typo stemming from a copy paste error. Fixes #7650
This commit is contained in:
parent
d68f2db7cb
commit
a672455ca9
@ -481,7 +481,8 @@ class CommandTree(Generic[ClientT]):
|
||||
try:
|
||||
commands = self._guild_commands[guild.id]
|
||||
except KeyError:
|
||||
return [cmd for ((_, g, _), cmd) in self._context_menus.items() if g is None]
|
||||
guild_id = guild.id
|
||||
return [cmd for ((_, g, _), cmd) in self._context_menus.items() if g == guild_id]
|
||||
else:
|
||||
base: List[Union[Command, Group, ContextMenu]] = list(commands.values())
|
||||
guild_id = guild.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user