discord.ext.commands - get attrs Arguments of Command #7433
-
Hello, For example:
How can I get the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The way you would use an attr, I should think. |
Beta Was this translation helpful? Give feedback.
-
You can get the Command using Alternatively, you can also use >>> @commands.command(usage='<usage>')
>>> async def foo(self, ctx): ...
>>>
>>> foo.usage
'<usage>' Documentation: https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Command.usage |
Beta Was this translation helpful? Give feedback.
You can get the Command using
bot.get_command('your_command_name')
and usecmd.usage
(wherecmd
is returned byget_command
).Alternatively, you can also use
.usage
on the decorated function. Like:Documentation: https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Command.usage