#Registering user_commands after startup.

1 messages · Page 1 of 1 (latest)

vestal pelican
#

I don't wish to create a global bot, so after startup and internal initialization I register commands (bot.command()) dynamically. It works for everything but user_command(). If I register a user command before using bot.start() it works. Any idea?

#

The reason I register commands dynamically is because I need to convert some data loaded from a database into discord.Role and discord.Guild objects, and connect to external services before the bot starts answering commnads.

vestal pelican
#

Seems like sync_commands() solved my issue. Is there a better way to disable all commands until startup is done?

terse warren