The moderation.toml file configures automatic moderation actions for banned words.
Template
delete = []
kick = []
ban = []
mute = []
time_to_mute = 5 # In minutesValues
| Value | Type | Description |
|---|---|---|
delete | list | Banned words that trigger message deletion |
kick | list | Banned words that trigger user kick |
ban | list | Banned words that trigger user ban |
mute | list | Banned words that trigger temporary mute |
time_to_mute | integer | Duration of mute in minutes |
How It Works
- When a user sends a message, the bot checks it against all lists
- If a word matches:
delete: The message is deletedkick: The user is kicked from the serverban: The user is banned from the servermute: The user is muted for the specified duration
- The bot attempts to DM the user about the action taken
Priority
Actions are checked in this order:
ban(most severe)kickmutedelete(least severe)
A word appearing in multiple lists will trigger all applicable actions.
Examples
Simple word filter
delete = ["badword", "offensive"]Multi-level moderation
delete = ["spam", "advertisement"]
kick = ["insult", "harassment"]
ban = ["hate speech", "threats"]
mute = ["profanity"]
time_to_mute = 10Case-insensitive
All matching is case-insensitive, so “BADWORD” will match “badword” in the list.
Safety Notes
- The bot requires appropriate permissions (Manage Messages, Kick Members, Ban Members) for these actions
- Moderation actions are logged to the console
- Users are DM’d when actioned (if possible)