danparizher / Pax-Academia

General purpose utility bot for the Homework Help Discord server
MIT License
13 stars 5 forks source link

Help channel message count features #285

Open ceSchueler opened 2 months ago

ceSchueler commented 2 months ago

This ( #164 #167 ) should

Perhaps related to this: staff-only command to make queries to the DB? Of course only if it can be made zero-trust, i.e. that you can't execute DROP TABLE or make injections. Idk if there would be any sensitive queries content-wise that Moderators (Guides definitely) could do...

sebastiaan-daniels commented 2 months ago

exclude messages sent in channels in the "Special Help" category (360689175944626176).

Ok.

include a command for staff to check a user's message count in help channels.

I'll try to create a command for that soon:tm:

staff-only command to make queries to the DB?

Absolutely not. No No No.... Best case scenario you can try to create some CRUD pages for certain fields but otherwise no

ceSchueler commented 2 months ago

Absolutely not. No No No.... Best case scenario you can try to create some CRUD pages for certain fields but otherwise no How about some R _ pages (so only Read) for all fields?

Actually, I don't know all the fields we have in the DB, is that documented somewhere, or would I need to check the code?

sebastiaan-daniels commented 2 months ago

Actually, I don't know all the fields we have in the DB, is that documented somewhere, or would I need to check the code?

Yes, it is quite easy, Download this program and open the file in database/ERD.mdj

How about some R _ pages (so only Read) for all fields?

There are 5 database tables, 3 of those are directly related to staff applications. These are already part of a fully working CRUD. The other two is the user table and alerts table.

For the user table, as you've suggested the only thing kept there is the message count. There will be a command to read those soon. We could do something similar for the alerts.

If we'd do that we would have pretty much the entire db covered.

ceSchueler commented 2 months ago

Yes, it is quite easy, Download this program and open the file in database/ERD.mdj

Ooh this looks great, thanks!

For the user table, as you've suggested the only thing kept there is the message count. There will be a command to read those soon. We could do something similar for the alerts.

And cooldown, but I guess that would only be relevant if a user complaints that they can't submit an application and then only to see if cooldown >0.

If we'd do that we would have pretty much the entire db covered.

Yeah, that would be great!

ceSchueler commented 1 month ago

Edited issue to reflect some additional feature requests for the staff command.