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

Add mod-log command #44

Open Vic-ST opened 3 years ago

Vic-ST commented 3 years ago

Add the mod-log command

Command Format

!mod-log @ user

Command Usage

This command, mod-log, is used to see all the mod actions made by a certain user. This is for use only to make sure that people don't abuse their moderation power. Again, I trust everyone here, but once this server gets bigger, we'll have to worry about this much more. This command should just do a simple SELECT * FROM mod_logs WHERE user = user and display it to the person who requested it in a nice embed message

Limited Usage

Mod-log command can only be used by Super Users, Mods, and Admins

Check out issue #7 for more information

aedwardg commented 3 years ago

Are we still looking to build out this user-info command, even though we have MEE6 premium and Dyno premium?

Vic-ST commented 3 years ago

@aedwardg Sorry, missed this comment. No, I don't think we have to worry about that command anymore, I'll edit it out of the issue.

aedwardg commented 3 years ago

Adding the High Priority label here since we're expanding the server staff and this will be even more important to keep track of.

elisabethkaseda commented 3 years ago

We'll also want to edit the issue to say it's for Mods and Admins only, since we're depreciating Super Users.

Since some people (me) do a lot of mod commands (esp adding notes), we'll definitely need to get the bot displaying browsable pages of info, or else we won't be able to see everything and/or it'll take up way too much space in a channel.

lyallstewart commented 2 years ago

So I've been looking into a way to do this and it seems like, as Elisabeth said, it's definately not feasable to send all of them at once (or even in multiple embeds) because of the amount of channel space it would take up.

It seems to me like the best options would be to:

  1. Use a package like discord.js-pagination to handle having multiple pages in each embed - this one is probably the easiest we can do now but has the pretty significant downside of needing an extra dependancy.
  2. Do it manually using reactions (although this is a decent amount of work for a command that might not be used too often)
  3. Wait until we eventually port the bot over to discord.js v13 and then use buttons for pagination.

I've been playing around with prototyping all three and it seems like by far the easiest way is to use a dependancy but I was curious what people thoughts on it are 🙂

aedwardg commented 2 years ago

Can we think of any reason why we wouldn't want to just show the most recent 50 or so actions? This would greatly simplify the implementation of the command and likely cover 99% of all realistic use cases. Some of our mods may not even have taken 50 mod actions yet...