Permission
Configuration reference for permission.json.
Introduction
The Permission configuration file (permission.json) controls access to bot commands using a role-based hierarchy system or Discord's built-in permission system.
Enabled
Type: Boolean
Whether to use the custom permission system.
enabled: trueWhen true: Uses the custom role-based permission levels defined in this config
When false: Uses Discord's native command permission system
Warning: If disabled, everyone can use every command unless you manually configure permissions in Discord Server Settings > Integrations > Athena Bot.
Learn more about Discord's built-in command permissions: Discord Support Article
Permission Levels
Type: Object
Define role-based permission levels with Discord role IDs.
permission_levels: {
management: "804354019455139900",
admin: "804354024048427009",
staff: "804354029076348959",
support: "884573835205148692",
member: "804354037662220289",
everyone: "804352424777220186",
}How it works:
- Each permission level is assigned to a Discord role ID
- Permission level names can be customized (they don't have to match role names)
- When a command requires a specific permission level, users with that role or any role higher in the Discord role hierarchy can use it
- The
everyonelevel should be set to your server ID (same as @everyone role)
Example: If a command requires support level, users with the support role, staff role, admin role, or management role can all use it.
Admins
Type: Array of Strings
User IDs that bypass all permission checks.
admins: ["707336356786864211", "123456789012345678"]These users can execute any command regardless of their roles or the command's required permission level.
Command Permissions
Commands are organized by plugin category, with each command assigned a permission level.
Format:
plugin_name: {
command_name: "permission_level",
}Examples:
core: {
botinfo: "member",
setup: "management",
restart: "management",
}
moderation: {
warn: "staff",
ban: "admin",
report: "member",
}
tickets: {
tclose: "support",
tpanel: "management",
}The permission level must match one of the levels defined in permission_levels.
Complete Configuration Example
Here's a production-ready permission configuration:
{
config: {
enabled: true,
permission_levels: {
management: "804354019455139900",
admin: "804354024048427009",
staff: "804354029076348959",
support: "884573835205148692",
member: "804354037662220289",
everyone: "804352424777220186", // Your server ID
},
admins: ["707336356786864211"],
core: {
botinfo: "member",
setup: "management",
restart: "management",
},
moderation: {
warn: "staff",
ban: "admin",
kick: "admin",
mute: "staff",
},
tickets: {
tclose: "support",
tpanel: "management",
topen: "support",
},
// Add all other plugin commands following the same format
},
}Tip: The default configuration file includes all available commands. Simply adjust the permission levels to match your server's role structure.