NanderTGA / msgroom-orm

A MsgRoom client.
https://nandertga.github.io/msgroom-orm/
MIT License
4 stars 0 forks source link

Admin-only commands #59

Open NanderTGA opened 1 year ago

NanderTGA commented 1 year ago

I've seen quite some bots implementing some admin system of their own, often having people with the same ID being an admin by default, who then can give other people admin access. Then they have to deal with loading and saving that stuff.

Since this kind of functionality is common, and people don't get promoted or demoted a lot, and there usually only are a few admins, a simple JSON file will do just fine.

I'll do it like this:

nolanwhy commented 8 months ago

You should not use JSON, but sqlite instead. Because imagine having a lot of admins, and it needs to save everything again when a new admin is here. That could possibly damage the hard drive.

NanderTGA commented 8 months ago

This option has been on hold for a while because of the possibly flawed implementation, even though I haven't told anyone about this. This is indeed not a good idea, but your suggestion also doesn't seem like a very good idea. My idea is to have people provide some implementation of themselves, and maybe have some separate packages for commonly used implementations, like JSON files or sqlite.