You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "d:\gradientbot\tests\test.py", line 17, in <module>
class TestCog(commands.Cog):
File "d:\gradientbot\tests\test.py", line 22, in TestCog
@application_checks.check_any(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\gradientbot\venv\Lib\site-packages\nextcord\ext\application_checks\core.py", line 223, in check_any
raise TypeError(
TypeError: <function _permission_check_wrapper.<locals>.wrapper at 0x000001DE62F423E0> must be wrapped by application_checks.check decorator
Intents
nextcord.Intents.all()
System Information
Python v3.11.5-final
nextcord v2.6.0-final
aiohttp v3.9.1
system info: Windows 10 10.0.19045
Checklist
I have searched the open issues for duplicates.
I have shown the entire traceback, if possible.
I have removed my token from display, if visible.
Additional Context
The problem seems to occur only with these checks:
Same happens with nextcord.ext.commands.check_any() and nextcord.ext.commands.has_guild_permissions(). Most likely, the issue affects every permission check.
Traceback (most recent call last):
File "c:\path\to\bot\main.py", line 8, in <module>
@commands.check_any(commands.has_guild_permissions(manage_guild=True))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\path\to\bot\.venv\Lib\site-packages\nextcord\ext\commands\core.py", line 1929, in check_any
raise TypeError(f"{wrapped!r} must be wrapped by commands.check decorator") from None
TypeError: <function _permission_check_wrapper.<locals>.wrapper at 0x0000026C5B01D800> must be wrapped by commands.check decorator
System info: Python 3.11.8, Nextcord-3.0.0a25+g1c860268, aiohttp 3.9.3, Windows 11 22631.3155.
This is not the same @A1Asriel, that is ext.commands.
I understand, but even if it's in another module, it still produces the same error and is triggered by the same conditions. I can open another issue, if needed.
Summary
application_checks.check_any() raises a TypeError
Reproduction Steps
Wrap a slash command in
application_checks.check_any()
decorator withhas_permissions()
orhas_guild_permissions()
checks.Minimal Reproducible Code
Expected Results
The slash command registers without any errors.
Actual Results
Intents
nextcord.Intents.all()
System Information
Checklist
Additional Context
The problem seems to occur only with these checks:
has_permissions
has_guild_permissions
bot_has_permissions
bot_has_guild_permissions
This decorator works fine:
The text was updated successfully, but these errors were encountered: