Moderation

Understand all the various commands for moderating users.

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.

This page will detail the various basic moderation commands available to moderators.

These commands work primarily on the levels system, but you can optionally allow (or disallow!) access to specific users and roles on a per-command basis. To do this, simply add a key after the "level" definition of a command called "overrides", like this example shows:

    kick:
      enabled: false
      level: 50
      overrides:
        user blacklist:
        role blacklist:
        user whitelist:
        role whitelist:

Each value of the four given keys under overrides are lists, which can be given in traditional Python list formatting (with each value being an integer and NOT a string!) or you can use YAML's native list syntax involving hyphens for each value.

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.

moderation:
  enabled: false
  commands:
    ban:
      enabled: false
      level: 50
    kick:
      enabled: false
      level: 50
    mban:
      enabled: false
      level: 100
    mkick:
      enabled: false
      level: 100
    mmute:
      enabled: false
      level: 50
    mwarn:
      enabled: false
      level: 50
    mute:
      enabled: false
      level: 50
    softban:
      enabled: false
      level: 50
    tempban:
      enabled: false
      level: 50
    tempmute:
      enabled: false
      level: 50
    unban:
      enabled: false
      level: 100
    unmute:
      enabled: false
      level: 50
    vkick:
      enabled: false
      level: 50
    warn:
      enabled: false
      level: 50

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 moderation 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.

CommandDescription

!ban

!forceban

!cleanban

Bans a user from the server. If the user argument does not represent an actual member, this is a forceban.

Using the alias !cleanban automatically purges the last 24 hours of messages sent by the user.

The bot must have Ban Members to use this command.

!warn

Warns a member of the server. This does nothing except add a note based infraction that can be used for member tracking. Reasons are required.

!kick

Kicks a member from the server. The target must be a member or it will not function.

The bot must have Kick Members to use this command.

!mban

Bans multiple users from the server. The list of users given must represent valid people or it will stop parsing members. If the user is not a member of the server, it will be a forceban.

The bot must have Ban Members to use this command.

!mkick

Kicks multiple members from the server. The list of members given must represent valid people or it will stop parsing the list. Members who don't exist in your server are discarded automatically.

The bot must have Kick Members to use this command.

!mmute

Permanently mutes multiple members of the server. The list of members given must represent valid people or it will stop parsing the list. Members who don't exist in your server are discarded automatically.

The bot must have Manage Roles to use this command. Additionally, the role must be below the bots' highest role in order to add it.

!mwarn

Warns multiple members of the server. The list of members given must represent valid people or it will stop parsing the list. Members who don't exist in your server are discarded automatically.

!mute

Permanently mutes a member from the server. This basically adds the configured mute role to the member, which -- if configured correctly -- will revoke the members' ability to post in the server.

This command has an alias: if you format it like a tempmute, then it will redirect to the tempmute command automatically.

The bot must have Manage Roles to use this command. Additionally, the role must be below the bots' highest role in order to add it.

!nameban

Bans members matching a specific username. This command can be useful in situations with raids involving bots with the exact same name.

This command requires that you have the ability to use !mban.

The bot must have Ban Members to use this command.

!softban

Softbans a member of the server. A softban effectively performs a ban with the cleanup of 24 hours of messages, then revokes the ban.

The bot must have Ban Members to use this command.

!tempban

!tempban modify

Temporarily bans a member of the server. These are full bans, but the expiration of them is handled by the bot automatically.

The !tempban modify subcommand allows you to edit the expiry time. This new time is calculated from the original infraction date.

The bot must have Ban Members to use this command.

!tempmute

!tm

Temporarily mutes a member of the server. This basically adds the configured mute role to the member, which -- if configured correctly -- will revoke the members' ability to post in the server.

The bot must have Manage Roles to use this command. Additionally, the role must be below the bots' highest role in order to add it.

!unban

Unbans a user from the server. This will allow them to rejoin the server if the given ID represents a user.

The bot must have Ban Members to use this command.

!unmute

Unmutes a member from the server. This removes the configured Mute Role and grants the ability to post on the server again.

The bot must have Manage Roles to use this command. Additionally, the role must be below the bots' highest role in order to remove it.

!vkick

!voicekick

Disconnects / voice kicks a member from the server. For obvious reasons, this must represent a member who is actually connected to a voice channel.

The bot must have Move Members to use this command.

Syntax and Examples

Below are the syntax requirements of the above commands, along with an example to show how it works.

SyntaxExamples

!ban MEMBER/USER REASON

!ban @SajuukBot#2980 bad user !ban 161815653387468800 bad user

!kick MEMBER REASON

!kick @SajuukBot#2980 bad user !kick 161815653387468800 bad user

!mban USERS/MEMBERS REASON

!mban 161815653387468800 535882175350964248 745027059042091019 bad users

!mkick MEMBERS REASON

!mkick 161815653387468800 535882175350964248 745027059042091019 bad users

!mmute MEMBERS REASON

!mmute 161815653387468800 535882175350964248 745027059042091019 bad users

!mwarn MEMBERS REASON

!mwarn 161815653387468800 535882175350964248 745027059042091019 bad user

!mute MEMBER REASON

!mute @SajuukBot#2980 bad user !mute @SajuukBot#2980 6h bad user !mute 161815653387468800 bad user !mute 161815653387468800 6h bad user

!nameban USERNAME REASON

!nameban SuperSajuuk shitposting

!softban MEMBER REASON

!softban @SajuukBot#2980 bad user !softban 161815653387468800 bad user

!tempban MEMBER TIMESTAMP REASON

!tempban @SajuukBot#2980 1d bad user !tempban 161815653387468800 1d bad user

!tempban modify USER TIMESTAMP

!tempban modify 161815653387468800 6h

!tempmute MEMBER TIMESTAMP REASON

!tempmute @SajuukBot#2980 1d bad user !tempmute 161815653387468800 1d bad user

!tempmute modify MEMBER TIMESTAMP

!tempmute modify @SajuukBot#2980 6h !tempmute modify 161815653387468800 6h

!unban USER REASON

!unban 161815653387468800 good user

!unmute MEMBER REASON

!unmute @SajuukBot#2980 good user !unmute 161815653387468800 good user

!vkick MEMBER REASON

!vkick @SajuukBot#2980 bad user !vkick 161815653387468800 bad user

!warn MEMBER REASON

!warn @SajuukBot#2980 bad user !warn 161815653387468800 bad user

Last updated