D
D
Dream2021-06-23 18:33:46
Bots
Dream, 2021-06-23 18:33:46

How to make commands automatically added to help?

I'm making a bot on discord.py, how can I make sure that all commands and categories (currency, moderation, modes) are automatically registered in the help command?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-06-24
@Vindicar

Well, firstly, if you write a docstring to the function that implements the command, then this docstring will be used as a reference. In this case, all commands in a separate Cog class will already be grouped together.
Secondly, the @bot.command() decorator has a help parameter - if I understand correctly, it allows you to specify the command description explicitly, instead of using docstring.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question