$clear

Clears messages from a channel. You can clear messages from a specific user, or clear all messages in the channel.

Usage:

$clear[amount;userID or everyone(optional);channelID (optional)]

Parameters:

  • amount: The number of messages to clear (maximum 100).
  • userID (optional): The ID of the user whose messages you want to clear. If omitted, or set to everyone, all messages will be cleared.
  • channelID (optional): The ID of the channel to clear messages from. If omitted, the current channel is used.

Example:

Before:

Member04/04/2025
I'm a spammer, everyone shut up!
Member04/04/2025
I'm a spammer, everyone shut up!
Member04/04/2025
I'm a spammer, everyone shut up!
Member04/04/2025
I'm a spammer, everyone shut up!
Member04/04/2025
I'm a spammer, everyone shut up!
Member04/04/2025
I'm a spammer, everyone shut up!
Good Moderator04/04/2025
!!exec $clear[10;everyone] $sendMessage[Channel has been purged]

After:

Custom Command Bot 04/04/2025
Channel has been purged.

WARNING

You can clear a maximum of 100 messages at a time. Messages older than 2 weeks cannot be cleared.

Function Difficulty: Medium