mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-12 12:55:31 +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):
|
async def _call_context_menu(self, interaction: Interaction, data: ApplicationCommandInteractionData, type: int):
|
||||||
name = data['name']
|
name = data['name']
|
||||||
guild_id = interaction.guild_id
|
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:
|
if ctx_menu is None:
|
||||||
raise CommandNotFound(name, [], AppCommandType(type))
|
raise CommandNotFound(name, [], AppCommandType(type))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user