Cleaning
Understand all the subcommands available for purging messages from the chat.
SajuukBot will be ceasing operations on March 31st 2024, due to a variety of factors. For more information, please refer to the announcement provided on the SajuukBot discord server and your options for migrating to a new bot.
SajuukBot offers a number of bot commands for automating the removal of multiple messages from a channel. This allows for a clean archive to be generated of all purged messages without flooding a modlog in multiple single-message deletes, and also making it easier for moderators to deal with disruptive behaviour.
As with the base moderation commands described on the Moderation page, the cleaning module uses levels and allows exemptions to be applied.
Configuration
This section of configuration is a root key, which means it should not be indented and in line with the basic settings like levels, prefix and the like. Please see the full basic configuration for more details on how it should be formatted.
The suppress invoke
option under the commands key is an optional setting which may be used to remove the invoking message from chat. This can be useful in certain situations in which you want the bot to perform its clean up, then remove all trace of the command being invoked within a channel. If the setting is false, or it is not included, by default the bot leaves your invoking command message in chat.
Commands
Due to space constraints, the required syntax of commands, and an example of how they work, are given provided after the list of commands and explanations.
Every command follows the exact same formatting:
A key called
enabled
determining if the command is enabled or not.A key called
level
, determining the minimum level required to use the command
At the root of the clean key is an enabled
key, which globally controls the commands assigned to this module. If the root key is false, then no command will operate, regardless of whether an individual command is enabled.
In all subcommands, with the exception of until and between, a limit is an optional argument. It is always the last argument in the command. If it isn't defined, the default is 25.
Command | Description |
---|---|
| Cleans messages associated to a specific user from the invoking channel. For a shorthand method of using this command, you can drop the |
| Cleans messages from the invoking channel. |
| Cleans messages associated to bot users from the invoking channel. This may serve very little purpose unless its within a bot commands channel, as only messages from actual bot accounts will be targeted. |
| Cleans messages from a specified channel that isn't the invoking channel |
| Cleans messages associated to a specific user from a specified channel that isn't the invoking channel. |
| Cleans messages within two message ranges, where the first ID references an old message and the second ID references a newer message. |
| Cleans messages up to the defined message ID. This is equivalent to using |
| Resets the state of cleaning in a channel, in case an error occurred that prevented the state being updated automatically. This will not cease any running cleans that have already been started. |
Syntax and Examples
Below are the syntax requirements of the above commands, along with an example to show how it works.
Syntax | Examples |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Last updated