Deleting Commands
Registration and Deletion
Deletion without Shandler
<client>.api.applications(client.user.id).commands('COMMAND-ID').delete(); //globad command
<client>.api.applications(client.user.id).guilds('GUILD-ID').commands('COMMAND-ID').delete(); //guild specific commmandDeletion with Shandler
const commands = [
{
name:'ping',//this is optional when there is an id
id:'965874566987541265'/* this is optional when there is a name,
as we will fetch all the commands and then find the command
according to the given values */
},
{
name:'user',
id:'877645876978676234'
}
]
const guild = []
client.on('ready', () => {
handler.delete(commands,guild)
})Last updated
Was this helpful?