-
Notifications
You must be signed in to change notification settings - Fork 10
Permissions
k8thekat edited this page Nov 3, 2022
·
8 revisions
This section is for those wanting to really "Fine Tune" your permissions.
- Gatekeeperv2 has the ability to set permissions per command or globally across a parent command.
- See below for How to use!
- You can make as many "Roles" as you want and can assign them to Discord users however you want!
- The only restriction is that ANY ROLE you give a Discord User via the
/user role
command MUST EXIST in thebot_perms
file or it won't work.
- The only restriction is that ANY ROLE you give a Discord User via the
- After configuring your
bot_perms.json
file, simply restart Gatekeeper and use the command/bot permissions
and selectCustom
- Gatekeeper will verify the file, reporting any issues it finds and exiting. You must restart the bot after fixing your permissions file.
- TIP: I strongly recommend keeping a backup of the file when making changes.
-
WARNING: Gatekeeper will NOT START if you are set to
Custom
and the file is invalid.
-
TIP - The bot will still respect those with Discord Administrator Permission privelage under
Role -> Advanced Permissions
.-
WARNING: The bot will no longer respect the role set by
/bot moderator
, it is completely bypassed.
-
WARNING: The bot will no longer respect the role set by
- Gatekeeper will verify the file, reporting any issues it finds and exiting. You must restart the bot after fixing your permissions file.
- Each role must have a
name
,discord_role_id
,prefix
andpermissions
.-
ATTENTION: All these values must exist!
discord_role_id
andprefix
are the only ones that can be set to"None"
-
TIP: You can get a Discord role's ID via the
/bot roleid (role)
command.
"name": "Admin", #This field can be set to any name/phrase you want to set as a "role" "discord_role_id": "1004516841932214373", #This must be the numeric value you get from Copy Role ID in developer mode. "prefix": "Admin", #This will be displayed when a User with this role talks On Discord and is sent to the Dedicated Server. "permissions": [ "bot.status", "bot.ping", "bot.sync"]
-
ATTENTION: All these values must exist!
-
Simply place the permission node inside the Roles permissions list.
-
REMINDER: You want to place the permission node inside the
opening "[" and closing "]"
, each entry needsquotes("double")
and between each entry needs to be acomma(,)
. (eg `'-bot.status', '-bot.)
{"name": "Admin", "discord_role_id": "1004516841932214373", #Must be a Discord Role ID. "prefix": "permissions": ["bot.status", #This is ALLOWING the command '/bot status' "bot.ping", "bot.sync"]}
-
REMINDER: You want to place the permission node inside the
- Simply place the permission node inside the Roles permissions list with a
-
in front of it. (eg.-bot.status
)-
REMINDER: You want to place the permission node inside the
opening "[" and closing "]"
, each entry needsquotes("double")
and between each entry needs to be acomma(,)
. (eg"-bot.status", "-bot.ping"
)
{"name": "Admin", "discord_role_id": "1004516841932214373", "permissions": ["-bot.status", #This is REMOVING the permissions node bot.status preventing the role from using the command '/bot status' "bot.ping", "bot.restart"]}
-
REMINDER: You want to place the permission node inside the
- Adding the permission node
server.*
would give the Role full access to any/server
command.- Location of the wildcard does not matter.
-
TIP: You can REMOVE permission for a specific command simply by adding a
-
before the permission node (eg.-server.list
)- The user would still have access to all other
/server
commands EXCEPT/server list
.
{"name": "Admin", "discord_role_id": "1004516841932214373", "permissions": ["bot.*", #This is my wildcard, allowing me to use any command that starts with '/bot' "-bot.status"]} #This is REMOVING the permission to use the command '/bot status' even though the wildcard exists.
- The user would still have access to all other
- This list may be missing permissions. You have been warned, check your logger for permission nodes.
- For a User to interact with the buttons from the
/server status
command. They need the respective permission nodes.-
Start Button requires
server.start
-
Stop Button requires
server.stop
-
Restart Button requires
server.restart
-
Kill Button requires
server.kill
-
Start Button requires
- For a user to interact/send console commands via the Discord Console Channel. They need
server.console.interact
"bot.*",
"bot.permissions",
"bot.settings",
"bot.donator",
"bot.moderator",
"bot.utils.*",
"bot.utils.roleid",
"bot.utils.channelid",
"bot.utils.userid",
"bot.utils.ping",
"bot.utils.disconnect",
"bot.utils.clear",
"bot.utils.restart",
"bot.utils.status",
"bot.utils.sync",
"bot.cog.*",
"bot.cog.load",
"bot.cog.unload",
"bot.cog.reload",
"bot.banner.*",
"bot.banner.auto_update",
"bot.banner.type",
"whitelist.*",
"whitelist.auto",
"whitelist.channel",
"whitelist.waittime",
"whitelist.pendingemoji",
"whitelist.doneemoji",
"whitelist.reply.*",
"whitelist.reply.add",
"whitelist.reply.remove",
"whitelist.reply.list",
"dbserver.*",
"dbserver.cleanup",
"dbserver.swap",
"user.*",
"user.info",
"user.add",
"user.update",
"user.uuid",
"user.role",
"user.steamid",
"server.*",
"server.display",
"server.start",
"server.stop",
"server.restart",
"server.kill",
"server.msg",
"server.backup",
"server.status",
"server.users",
"server.broadcast",
"server.settings.*",
"server.settings.info",
"server.settings.displayname",
"server.settings.description",
"server.settings.ip",
"server.settings.role",
"server.settings.prefix",
"server.settings.avatar",
"server.settings.donator",
"server.settings.hidden",
"server.console.*",
"server.console.channel",
"server.console.filter",
"server.console.interact",
"server.chat.channel",
"server.event.channel",
"server.whitelist.*",
"server.whitelist.true",
"server.whitelist.false",
"server.whitelist.add",
"server.whitelist.remove",
"server.nickname.*",
"server.nickname.add",
"server.nickname.remove",
"server.nickname.list",
"server.banner.settings",
"server.banner.background"