Command executes when a user leaves the guild.
Last updated 3 years ago
Was this helpful?
Event: onLeave Type: leaveCommand
onLeave
leaveCommand
Add the onLeave Event:
bot.addEvent([ "onMessage", "onInteraction", "onLeave" //This is what you need to add ])
Add the GUILD_MEMBERS Intent:
GUILD_MEMBERS
const dbd = require("dbd.ts") const bot = new dbd.Bot({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_MEMBERS"], prefix: "PREFIX" }) //The rest of your index.js file here
Enable Prilivaged "Members Intent" in the :
bot.commands.add({ type: "leaveCommand", code: `$channelSendMessage[773363417338609674;Sad to see $userTag[$authorID] go :(]` })
You should use server variables in $channelSendMessage[] (if your bot is in more than 1 server).
$channelSendMessage[]