raidprotect icon indicating copy to clipboard operation
raidprotect copied to clipboard

Moderation commands

Open baptiste0928 opened this issue 1 year ago • 1 comments

The new version of RaidProtect will focus more on moderation features, with an advanced dashboard to manage sanction of a server. The first step is to implement the basic moderation commands:

  • /kick: kick a member from the server
  • /ban: ban a user from the server
  • /mute: mute a member (using Discord native timeouts)
  • /warn: warn a user (send a dm with the warning if the user is on the server)

Implementation

All those commands will have a similar behavior.

  1. A moderator run one of the moderation commands.
  2. The bot ensures the moderator has required permissions to take action on the targeted user.
  3. If no reason has been provided in the command, a modal component prompt the moderator for a reason. If enforce_reason is enabled in guild configuration, the field is required to continue. The moderator can also add internal notes linked to the sanction.
  4. The targeted user receives a dm with the reason of the sanction.
  5. The bot performs the sanction (kick/ban/mute)
  6. A message is sent in the guild logs channel and the sanction is stored in the database.
  7. The moderator is informed that the action has been performed with a message.

Because of this similarity, most code can be shared between all the commands.

Progress tracking

  • [ ] Kick command (steps 1-3 are done)
  • [ ] Ban command
  • [ ] Mute command
  • [ ] Warn command

baptiste0928 avatar Jul 23 '22 10:07 baptiste0928

You can assign these commands to me, if you'd like.

the-wong-dev avatar Jul 25 '22 14:07 the-wong-dev