The Moderation module (moderation) is responsible for applying different automatic protections to the server to prevent attacks or unwanted behaviors, such as spam, flood, raids, and malicious bots.
Option
Description
muteRoleId
The ID of the role for mutes. If not specified, it will try to deduce it automatically.
useNativeMute
true to use Discord’s native isolation system (Time Out) if possible.
Prevents users from sending too many messages in a short time or carrying out attacks on the server.
General
enabled: true to activate the antispam module.
maxLvl: Maximum authorization level affected.
ignoredUsers / ignoredChannels / ignoredRoles: Lists of IDs ignored by the filter.
deleteMessages: true to delete spam messages.
muteDuration / banDuration: Sanction duration in seconds (0 for permanent).
Flood
interval: Interval (in seconds) to consider it flood.
warn / mute / ban: Number of repeated messages to apply each sanction.
Duplicated Messages
interval: Interval (in seconds) for duplicated messages.
warn / mute / ban: Number of duplicated messages to apply a sanction.
Raid
interval: Time interval to consider it a raid.
count: Repeated messages by any person.
lockChannel: true to temporarily lock the channel.
channelLockDuration: Seconds for auto-unlock.
ban: true to ban participants.
message: Message to send when detecting the raid.
Emojis
max: Maximum number of emojis allowed per message before being considered spam.
Applies a sanction to any unwanted user or bot that sends a message in a “trap channel”.
Option
Description
channel
The ID of the trap channel.
verifyAction
true to request verification before sanctioning, false for direct sanction.
sanctionType
Type of sanction: none, warn, mute, ban, or kick.
sanctionDuration
Sanction duration (in seconds), 0 for permanent.
sanctionReason
Reason for the sanction.
ignoredRoles
Roles that the bot will ignore for this sanction.
Configuration example
muteRoleId : ' 123123123123123123 '
channelLockDuration : 3600
message : ' 🚨 Raid detected, channel temporarily locked. '
channel : ' 987654321012345678 '
sanctionReason : ' Unauthorized bot in trap channel '