Bot needs a method for syncing (current is flawed)
Discord slash commands are held on a tree. The tree needs to be synced with discord. This can either be done globally or per guild.
A command needs to be implemented. It can be called by mentioning the bot sync. The command can only be called in a guild and only by the owner of the bot.
Works like:
@bot sync-> global sync
@bot sync ~ -> sync current guild
@bot sync * -> copies all global app commands to the current guild and syncs
@bot sync ^ -> clears all commands from the current guild target and syncs (removes guild commands)
@bot sync id_1 id_2 -> syncs guilds with id 1 and 2
where bot here is the name of the bot.
Sync when you...
Added/removed a command
Changed a command's...
name (name= kwarg or function name)
description (description= kwarg or docstring)
Added/removed an argument
Changed an argument's...
name (rename decorator)
description (describe decorator)
type (arg: str str is the type here)
Added/modified permissions:
guild_only decorator or kwarg
default_permissions decorator or kwarg
nsfw kwarg
Converted the global/guild command to a guild/global command
Do not sync when you...
Changed anything in the function's body (after the async def (): part)
Bot needs a method for syncing (current is flawed)
Discord slash commands are held on a tree. The tree needs to be synced with discord. This can either be done globally or per guild.
A command needs to be implemented. It can be called by mentioning the bot
sync
. The command can only be called in a guild and only by the owner of the bot.Works like:
@bot sync
-> global sync@bot sync ~
-> sync current guild@bot sync *
-> copies all global app commands to the current guild and syncs@bot sync ^
-> clears all commands from the current guild target and syncs (removes guild commands)@bot sync id_1 id_2
-> syncs guilds with id 1 and 2 wherebot
here is the name of the bot.Sync when you...
Do not sync when you...
This is the same for hybrid commands