From 1bfe6b2bb160ce802a1f08afed73941a19a0a651 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 15 Apr 2022 04:00:24 -0500 Subject: [PATCH] Fix support for guilds decorator with context menu commands --- discord/app_commands/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/app_commands/commands.py b/discord/app_commands/commands.py index 8e7ec1337..70dc52f00 100644 --- a/discord/app_commands/commands.py +++ b/discord/app_commands/commands.py @@ -873,7 +873,7 @@ class ContextMenu: self._param_name = param self._annotation = annotation self.module: Optional[str] = callback.__module__ - self._guild_ids = guild_ids + self._guild_ids = guild_ids or getattr(callback, '__discord_app_commands_default_guilds__', None) self.on_error: Optional[UnboundError] = None self.checks: List[Check] = getattr(callback, '__discord_app_commands_checks__', [])