onBotLeave
Command executes when the bot gets removed/kicked from a guild.
Event: onBotLeave
Type: botLeaveCommand
Prerequisites
Add the onBotLeave
Event:
bot.addEvent([
"onMessage",
"onInteraction",
"onBotLeave" //This is what you need to add
])
Example
bot.commands.add({
type: "botLeaveCommand",
code: `$channelSendMessage[773363417338609674;
$title[1;Removed from Guild]
$color[1;RED]
$description[1;Guild Name: $serverName[$guildID]
Guild ID: $guildID]]`
})

Last updated
Was this helpful?