Skip to content
Discussion options

You must be logged in to vote

You can get the Command using bot.get_command('your_command_name') and use cmd.usage (where cmd is returned by get_command).

Alternatively, you can also use .usage on the decorated function. Like:

>>> @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

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@niklasmoell
Comment options

@imvaskel
Comment options

Answer selected by niklasmoell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants