diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 6e2ec38a8..44dfffc5e 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -162,6 +162,10 @@ class CogMeta(type): raise TypeError(no_bot_cog.format(base, elem)) commands[elem] = value elif isinstance(value, (app_commands.Group, app_commands.Command)) and value.parent is None: + if is_static_method: + raise TypeError(f'Command in method {base}.{elem!r} must not be staticmethod.') + if elem.startswith(('cog_', 'bot_')): + raise TypeError(no_bot_cog.format(base, elem)) cog_app_commands[elem] = value elif inspect.iscoroutinefunction(value): try: