onBanAdd()
bot.onBanAdd() is a callback which is triggered when a Member is banned.

Usage

1
bot.onBanAdd()
Copied!

Command

1
bot.banAddCommand({ //Command
2
channel: "Channel ID", //Channel where it will log
3
code: `Code` //Message sent to <channel>
4
})``
Copied!

Example

1
bot.banAddCommand({
2
channel: "832704676096245800",
3
code: `
4
$username was banned in $serverName`
5
})
6
7
bot.onBanAdd()
Copied!

Breakdown

  • bot.banAddCommand - Command Callback
  • Channel - Channel ID to send Message
  • Code - Your code that will be exeucted once the Client has a member left
  • bot.onBanAdd() - Callback
  • GUILD_MEMBERS intent is needed.
Last modified 1mo ago