mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Check the global scope when dispatching context menus
This commit is contained in:
parent
f09f0ea8ca
commit
8502978649
@ -672,7 +672,7 @@ class CommandTree(Generic[ClientT]):
|
||||
async def _call_context_menu(self, interaction: Interaction, data: ApplicationCommandInteractionData, type: int):
|
||||
name = data['name']
|
||||
guild_id = interaction.guild_id
|
||||
ctx_menu = self._context_menus.get((name, guild_id, type))
|
||||
ctx_menu = self._context_menus.get((name, guild_id, type)) or self._context_menus.get((name, None, type))
|
||||
if ctx_menu is None:
|
||||
raise CommandNotFound(name, [], AppCommandType(type))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user