#Registering user_commands after startup.
1 messages · Page 1 of 1 (latest)
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.
Seems like sync_commands() solved my issue. Is there a better way to disable all commands until startup is done?
This is a discord limitation, not a py-cord one. Commands ONLY register/sync BEFORE the on_ready event, unless you manually sync as you have come to realize. 🙂