Replies: 1 comment
-
You could use bot.command to manually add commands. Typically this is a decorator, however it can also be used as a function. you don't really need to do anonymous functions, for command in command_list:
async def newcommand(ctx):
...
bot.command("name")(newcommand) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello thanks for your work.
I'd like to be able to load a certain command via a configuration file.
To do this, I need to create my functions while my script is running. One idea I've explored is to create anonymous functions and add them to my bot during launch, but it seems impossible to create anonymous asynchronous functions.
Do you have an idea for adding commands linked to a function not previously defined?
Beta Was this translation helpful? Give feedback.
All reactions