#Managing command access depending on roles

1 messages · Page 1 of 1 (latest)

edgy dome

Hello ! PaimonWave

I would ask what's the best way to give (or not) access to a command, depending on a specific roles. I know this ins't very "many-server" friendly.

But since my actual bot is just for a test server, this is ok !

Why do I want to do that ? Mainly to allow that for example when a user with an Intern role do !help this show only the commands they have acces as an Intern, and thus when another user with an Employee role do the same, !help will show all commands they have acces as an Employee (and also as an Inter since the employee is supposed to have more permissions).

The only idea I can think of is to have either :
A list for each role with special permissions containing all accessible commands.
Or, for each command, a list of the IDs of the roles that have access to it

What is the best solution and are there others ?
By "best", I mean, something easily maintainable

node version : 16.15.0