Skip to content
Docs
CFTools Discord Bot
Client Permissions

Client Permissions

You can modify Moderators, Administrators, Developers and the Bot Owner in /config/config.js, this is optional

These are permission levels that are used internally by the bot to determine which commands specific users have access to. /help and /commands help menus are personal, and account for this dynamic, internal permission level. Available permissions levels are:

  • 0 - User - This is the default permission levels, everyone has this this - doesn't have access to any dangerous or otherwise sentive commands or functionality
  • 1 - Moderator - The moderator permission level has access to moderation commands like /heal, /kick, and /ban. Anyone that has the Discord permissions Kick Members and Ban Members, or has a role that is defined in the config#permissions#moderatorRoleIds is considered a Moderator
  • 2 - Administrator - The Administrator permission level is the highest permission level that can be assigned through Discord. Anyone with the Discord permission Administrator, or has a role that is defined in the config#permissions#administratorRoleIds is considered an Administrator internally and will have access to dangerous/sensitive commands like /broadcast, /dm-survivor, and /spawn-item
  • 3 - Server Owner - This is the permission level of your Discord server owner, only 1 person can have this at any given time. Used to make sure server owners have a snowflake permission level internally 🙏 Doesn't currently have any exclusive commands, but you can choose to restrict commands to this permission level as needed
  • 4 - Developer - This is for members that develop on the bot, has access to dev utilities like /eval and /exec. This permission level can do almost everything, including evaluating arbitrary code on your host machine - use with caution!
  • 5 - Bot Owner - Bypasses every permission and level check, has access to every command and all interaction components.
Do you want to learn more about the underlying bot structure and how to continue development yourself, check out the API Reference (opens in a new tab)

You can modify required permission levels to execute commands in the command files by setting the permLevel property. Let's take a look at an example /src/commands/ file:

module.exports = new ChatInputCommand({
  // Inside of the ChatInputCommand({
  // Can be set to User, Moderator, Administrator, Server Owner, Developer, Bot Owner
  // Support IntelliSense/auto-complete
  permLevel: 'Administrator',
  // ... other properties
  run: async (client, interaction) => {
    // The commands #run/execute function
  }
});