You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I've been recommending to people, is to maintain a sync command as a Message Command (@bot.command()) or some sort of message invoke.
Bots without the message content intent will still receive content of messages that mention them or are in DMs.
It's not like you can use a slash command to sync... when that command isn't synced.
Syncing gotchas
There is a ratelimit on syncing global commands which add commands.
Updating commands (currently) has no ratelimit.
It is still recommended to sync your commands to a test guild before syncing them globally. Discord.py has added a helper method to do just that:
CommandTree.copy_global_to
This util is used as follows:
# you have a defined Bot, with a tree and have commands added to it that are global.guild=ctx.guildordiscord.Object(id=...) # you can use a full discord.Guild as the method accepts a SnowflakeBot.tree.copy_global_to(guild=guild)
All this method does is copy your defined global commands (so ones without a guild or guilds kwarg, or without the @app_commands.guilds() decorator)
to the specified guild within the CommandTree.
When you use this method you must sync afterward still, you can refer to when_to_sync.md for details there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters