From 8502978649898f295592e017cabcae69571a2aa4 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 11 Mar 2022 00:51:14 +0100 Subject: [PATCH] Check the global scope when dispatching context menus --- discord/app_commands/tree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/app_commands/tree.py b/discord/app_commands/tree.py index f56687296..6c6880ed4 100644 --- a/discord/app_commands/tree.py +++ b/discord/app_commands/tree.py @@ -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))