-
Notifications
You must be signed in to change notification settings - Fork 1
Replace most of MEE6 #7
Description
I'd like to replace at least most of the moderation side of MEE6, this will hopefully allow for much more basic customization on our end.
Specific commands I'd like to add are:
Issue #39
- cc!ban @ user reason - Can only be used by Admins
- cc!unban @ user - Admins
- cc!tempban @ user LengthofTime reason - Mods and Admins
- cc!kick @ user reason - SUs, Mods, and Admins
Issue #40
- cc!mute @ user reason - Mods and Admins
- cc!unmute @ user - SUs, Mods, and Admins
- cc!tempmute time @ user reason - SUs, Mods, and Admins
Issue #41
- cc!warn @ user - SUs, Mods, and Admins
- cc!infractions @ user - SUs, Mods, and Admins
- cc!addnote @ user usernote - SUs, Mods, and Admins
- cc!notes @ user - SUs, Mods, and Admins
Issue #43
- cc!clear #numberofmessages - Mods, and Admins
- cc!clear-infractions @ user - Admins
- cc!remove-infraction infractionID - Mods and Admins
Issue #44
- cc!mod-logs @ user - SUs, Mods, and Admins (Not native to MEE6)
I'd also like to replace their audit log with one of our own makings, so we wouldn't use that feature at all on MEE6.
I'd like for a new table to created called mod-logs or something similar which logs ALL of these actions (except user-info, infractions, and mod-logs), shouldn't be hard, just insert a log into the table with the command, the user acted upon, the reason, the length of time (Indefinite for commands like mute/ban, amount of time for the tempmute/tempban commands), invalid header and the moderator. Along with the action being inserted into the database, I'd also like a message to be sent in the #audit-logs channel.
Remember to restrict these commands to their proper users. SUs, I know you want those ban commands but even though I trust ya'll, this server will eventually get new people who might try to raid the community and will be trust worthy enough to promote to SU but mess it up for everyone.
Database Info
The infraction database should look something similar to this:
| id | timestamp | user | action | length_of_time | reason | valid | moderator |
|---|---|---|---|---|---|---|---|
| 1 | 2021-01-01 23:59:59 | 608641641284370462 | cc!ban | NULL | Advertised his server | 1 | 988086123566672436 |
| 2 | 2021-01-01 23:59:59 | 711756182909485116 | cc!tempmute | 7d | Spammed | 1 | 988086123566672436 |
The mod_log database should look similar to the infractions database but should include more about the moderator:
| id | timestamp | moderator | action | length_of_time | reason |
|---|---|---|---|---|---|
| 1 | 2021-01-01 23:59:59 | 988086123566672436 | cc!ban <@608641641284370462> Advertised his server | NULL | Advertised his server |
| 2 | 2021-01-02 03:00:00 | automatic | cc!unmute | NULL | tempmute expired |
Resources
Banning users: https://discord.js.org/#/docs/main/stable/examples/moderation
DMing users: https://stackoverflow.com/questions/48495205/sending-dms-to-specific-people-discord-js
Muting users:
https://gist.github.com/heylastway/09241343572f07588ae262f66f474792
https://stackoverflow.com/questions/65707686/how-can-i-change-the-permissions-for-a-channel-in-discord-js
https://www.npmjs.com/package/ms
You can also checkout all the commands on mee6 to see what they do and what content you need to include.