onLeave
Triggered when a user leaves a server.
Add The Event: bot.addEvent("onLeave")
Type: leaveCommand
Base Code
bot.command({
type: "leaveCommand", // onLeave type.
channel: "channelID", // The channel which the message gets sent in.
code: `code` // The code to run when someone leaves.
})
Example
bot.command({
type: "leaveCommand",
channel: "39459438494840494",
code: `<@$authorID> just left the server!`
})
This requires members intent enabled!
Last updated
Was this helpful?