Triggered when a user gets banned from the server.
$onBanAdd[channelID] is a callback, which means it's used in the command trigger (not the code). The command is ran when a user is banned from the server.
(Type: Snowflake || Flag: Required): The ID of the channel where the message should be sent to.
Create a command with
$onBanAdd[channelID]as the trigger.
Input your code/reply text.
🧙♂️ You can use functions like
Now you have a ban message! ✨
Both free and premium users can use
$onBanAdd, and all users can put
$onBanAdd. However, non-premium users can not use
$getServerVar outside of callbacks.
If you own a public bot and want to make it so multiple different servers can use
$onBanAdd (e.g. set their own logging channel), follow these steps:
Create a variable named "
logs" and the value set to nothing.
Create a command for setting the logging channel, then put the following in your code:
$nomention $onlyAdmin[You need the admin permission to use that!] $argsCheck[>1;Please mention a channel!] Logging channel updated! $setServerVar[logs;$mentionedChannels]
📝 Servers will need to setup the channel they want the ban message to send to (by running a command with the code above).
$onBanAdd[channelID]in your command trigger, with
$onBanAdd[$getServerVar[logs]]and you're all set!