Currently, roles.ts assumes the presence of a role with name officer and gives this role privileged status. This could be an issue if other servers try to use the bot, or the bot is horizontally scaled to work on multiple servers.
Instead, a config variable should be added which stores the privileged role for the role management commands. The variable can be stored in config.json or another configuration file. Perhaps if the value is undefined, only the administrator role (which is server agnostic) is privileged.
Currently,
roles.ts
assumes the presence of a role with nameofficer
and gives this role privileged status. This could be an issue if other servers try to use the bot, or the bot is horizontally scaled to work on multiple servers.Instead, a config variable should be added which stores the privileged role for the role management commands. The variable can be stored in
config.json
or another configuration file. Perhaps if the value is undefined, only the administrator role (which is server agnostic) is privileged.