{{define "template_helper_mod_author"}}{{"{{"}}.Author.(Username/ID/Discriminator){{"}}"}} - The author of the ban/kick{{end}} {{define "cp_moderation"}} {{template "cp_head" .}} {{template "cp_alerts" .}}
{{template "moderation_general" .}}
{{template "moderation_mute" .}}
{{template "moderation_kick" .}}
{{template "moderation_ban" .}}
{{template "moderation_warn" .}}
{{template "cp_footer" .}} {{end}} {{define "moderation_general"}}

A set of moderation tools and commands to help you run a server.

Commands for performing moderation actions such as kicks and bans, as well as mutes, timed bans, warnings, mass deleting messages and so on.
It is highly recommended to couple the moderation actions with the message logs, this means that whenever your mods decide to perform an action on someone, a message log of the channel they ran the command in will be recorded and added to the mod log.

The moderation actions coupled with the message logs have been one of the most useful tools for me personally when running servers with thousands of members.

More documentation


{{checkbox "ReportEnabled" "report-enabled" "Enable report command?" .ModConfig.ReportEnabled}}

(mention or prefix) report @user some reason
Everyone can use this.
Report will upload a log of the last 100 messages in the channel and send a message about it in the report channel.


{{checkbox "LogUnbans" "log-unbans" "Log unban events in the modlog channel" .ModConfig.LogUnbans}}

For the author to show up when this is used you need to give the bot "audit log" permissions.


{{checkbox "GiveRoleCmdEnabled" "give-role-enabled" "Enable the giverole/addrole and removerole commands" .ModConfig.GiveRoleCmdEnabled}}

People with manage roles permissions plus extra roles set below can use this.


{{checkbox "GiveRoleCmdModlog" "give-role-modlog" "Log giverole/addrole and removerole to modlog?" .ModConfig.GiveRoleCmdModlog}}

{{checkbox "CleanEnabled" "clean-enabled" "Enable clean command?" .ModConfig.CleanEnabled}}

(mention or prefix) clean NUM {@user <- optional}
Manage Messages permission is required for this command.
Clean command can delete up to a 1000 messages back in history (max 100 messages at a time).
See -help clean for more advanced usage.


{{checkbox "LogBans" "log-bans" "Log ban events not made through the bot" .ModConfig.LogBans}}

For the author and reason to show up when this is used you need to give the bot "audit log" permissions.

{{end}} {{define "moderation_mute"}}

Muting users allows you to punish users by removing their ability to talk.

How YAGPDB Mutes users is it gives them a role which has the "Send messages" permission removed on all channels

The simplest way to use it is to have the bot manage the mute role (see below), but for more advanced usages you can blacklist channels and fully manage it on your own.

{{checkbox "MuteEnabled" "mute-enabled" "Enable Mute/Unmute" .ModConfig.MuteEnabled}}

(mention or prefix) mute/unmute @user 10 some reason
Only users with kick permission can use this (or with roles specified below).


For simple usage you can have the bot manage the role, look below for more info.


{{checkbox "MuteManageRole" "mute-managed" "Have the bot manage the mute role. It will automatically add overrides to all channels for the role." .ModConfig.MuteManageRole `onchange="MuteManagedChanged()"`}}

You still need to create and assign a mute role above.

{{checkbox "MuteDisallowReactionAdd" "disallow-reaction" "Disallow Adding Reactions when muted" .ModConfig.MuteDisallowReactionAdd}}






{{checkbox "MuteReasonOptional" "mute-reason-optional" "Mute Reason optional" .ModConfig.MuteReasonOptional}} {{checkbox "UnmuteReasonOptional" "unmute-reason-optional" "Unmute Reason optional" .ModConfig.UnmuteReasonOptional}}

Available template data:
{{template "template_helper_user"}} - The user being muted
{{"{{.Reason}}"}} - The reason specified in the mute
{{template "template_helper_mod_author"}}
{{"{{.Duration}}"}} - The duration
{{"{{.HumanDuration}}"}} - The duration in a human friendly format (1 hour and 3 minutes for example)


Available template data:
{{template "template_helper_user"}} - The user being unmuted
{{"{{.Reason}}"}} - The reason specified in the unmute
{{template "template_helper_mod_author"}}

{{end}} {{define "moderation_kick"}}

Allows you to kick members through a command, there's several benefits using this over just kicking them in Discord:

{{checkbox "KickEnabled" "kick-enabled" "Enable Kick command" .ModConfig.KickEnabled}}

(mention or prefix) kick @user some reason
Only users with kick permission can use this (or with roles specified below).
Same as ban command, but kicks instead.




{{checkbox "DeleteMessagesOnKick" "DeleteMessagesOnKick" "Delete the users last 100 messages on kick" .ModConfig.DeleteMessagesOnKick}}
{{checkbox "KickReasonOptional" "KickReasonOptional" "Make the reason optional" .ModConfig.KickReasonOptional}}

Available template data:
{{template "template_helper_user"}} - The user being banned/kicked
{{"{{.Reason}}"}} - The reason specified in the ban/kick
{{template "template_helper_mod_author"}}

{{end}} {{define "moderation_ban"}}

Allows you to ban users through the commands ban @user somereason and banid 1034924032 somereason, it has the following advantages over just banning them through discord:

Note that the bans themselves are on discord, to unban someone you need to go into your banlist on discord and unban them.

{{checkbox "BanEnabled" "BanEnabled" "Enable the Ban command" .ModConfig.BanEnabled}}

ban @user some reason
Only users with ban permission can use this. (or with roles specified below)
The ban command will ban a user as well as sending a message that the user was banned in the action channel.




{{checkbox "BanReasonOptional" "BanReasonOptional" "Make the reason optional" .ModConfig.BanReasonOptional}}

Available template data:
{{template "template_helper_user"}} - The user being banned/kicked
{{"{{.Reason}}"}} - The reason specified in the ban/kick
{{template "template_helper_mod_author"}}
{{"{{.Duration}}"}} - The duration
{{"{{.HumanDuration}}"}} - The duration in a human friendly format (1 hour and 3 minutes for example)

{{end}} {{define "moderation_warn"}}

Allows you to put warnings on users that shows up in the modlog. Warnings of a user can be accessed through warnings @user

{{checkbox "WarnCommandsEnabled" "WarnCommandsEnabled" "Enable the warning commands" .ModConfig.WarnCommandsEnabled}}

Only users with manage messages permission can use this (or with roles specified below).
warn @user some reason
Creates a new warning for the user
warnings @user
Displays a list of a specified user's warnings




{{checkbox "WarnIncludeChannelLogs" "WarnIncludeChannelLogs" "Create message logs in the channel that the command was run in when a user is warned" .ModConfig.WarnIncludeChannelLogs}} {{checkbox "WarnSendToModlog" "WarnSendToModlog" "Send warnings to the modlog" .ModConfig.WarnSendToModlog}}

Available template data:
{{template "template_helper_user"}} - The user being warned
{{"{{.Reason}}"}} - The reason specified in the warning
{{template "template_helper_mod_author"}}

Delete all warnings
{{end}}