$onBanRemove

Triggered when a user gets unbanned from the server.

$onBanRemove[Channel ID] is a callback, which means it’s used in the command trigger (not the code). The command is ran when a user is unbanned from the server.

Syntax

$onBanRemove[Channel ID]

Parameters

  • Channel ID (Type: Snowflake || Flag: Required): The ID of the channel where the message should be sent to.

Example

  1. Create a command with $onBanRemove[Channel ID] as the trigger.

    🧙‍♂️ You must replace “Channel ID” with a valid channel ID or a server variable that holds the channel ID (See more here…)!

    example1

  2. Input your code/reply text.

    🧙‍♂️ You can use functions like $username, $authorID, $authorAvatar here.

    example2

  3. Now you have an unban message! ✨

    Carl-bot (235148962103951360) was unbanned!

Advanced

Per-Server $onBanRemove

Both free and premium users can use $onBanRemove[], and all users can put $getServerVar[] within $onBanRemove[]. 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 $onBanRemove[] (e.g. set their own logging channel), follow these steps:

  1. Create a variable named “logs” and the value set to nothing.
    image

  2. 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[1]]
    

    📝 Servers will need to setup the channel they want the unban message to send to (by running a command with the code above).

  3. Now replace $onBanRemove[Channel ID] in your command trigger, with $onBanRemove[$getServerVar[logs]] and you’re all set!