'Get all bot commands discord.py
I'm making a help command using discord.py rewrite and I need a way to iterate over all the commands I already have inside the bot, is there a way to do like bot.get_all_commands?
for command in bot.get_all_commands:
print(command)
Solution 1:[1]
bot.commands returns all commands as command objects in a set.
Solution 2:[2]
You can use bot.all_commands to return all commands & aliases that you used before, See more in discord.ext.command .
Solution 3:[3]
This worked for me
commands = bot.get_my_commands()
for command in commands:
print(command)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | chluebi |
| Solution 2 | |
| Solution 3 | nazario |
