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
If you use the decorator @commands.is_owner() (and maybe other decorators aswell), on a command defined in a cog and you print the value of ctx.command.name in on_command as follow
If you use the decorator
@commands.is_owner()
(and maybe other decorators aswell), on a command defined in a cog and you print the value ofctx.command.name
inon_command
as followand invoke the default
help
command,on_command
will pint the name of the command using that check that has been loaded the first.Minimal test case (tested on rewrite, not async)
main.py
cog.py
cog2.py
If you run that code and invoke the default
help
command,on command
will print:Invoked command: hello_world
If you switch these 2 lines from:
to
then run the bot again and invoke the default
help
command,on_command
will print:Invoked command: hello_world2
The text was updated successfully, but these errors were encountered: