CodecademyCommunity / codecademy-discord-bot

Custom moderation bot for the official Codecademy Community Discord server.
https://codecademycommunity.github.io/
MIT License
11 stars 1 forks source link

Replace most of MEE6 #7

Open Vic-ST opened 3 years ago

Vic-ST commented 3 years ago

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

Issue #40

Issue #41

Issue #43

Issue #44

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.

aedwardg commented 3 years ago

I like this. We should keep this issue open as a checklist on which features we want to replace from MEE6.

But when we get there, I think each item on here should be broken out into its own issue. It will be easier to do this in smaller chunks and that way different people can tackle different features independently.

When the final task in this issue is completed, we can automatically close both that task's issue and this issue with the same PR.

Vic-ST commented 3 years ago

Cool cool, I agree, that'd make a lot of sense.

One thing about that, we might want to separate it out into grouped commands, for example:

Just based off of what type of concept you'll be using for each one. Ban, unban, and kick are all built into Discord.js whereas mute commands are done by giving people the "Muted" role, and the infraction commands are a whole other kettle of fish.

aedwardg commented 3 years ago

Yeah, that sounds good to me 👍

fedGL commented 3 years ago

Adding to features we want to implement, today Elisabeth was talking about banning a COPPA user and said "Dyno moderation has ways to add notes to users; does MEE6? It’d be good to leave a note of when they’ll be of age.". We probably want our bot to do this?

Vic-ST commented 3 years ago

I like it, shouldn't be difficult, we should just be able to add that on to the infractions command or something