Fix support for guilds decorator with context menu commands

This commit is contained in:
Harmon 2022-04-15 04:00:24 -05:00 committed by GitHub
parent f9ead92239
commit 1bfe6b2bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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__', [])