K
Docs
API ReferencePiecesHas Permission
🔐

Has Permission

base.member.has_permissionBase SetUser

Branches based on whether a server member has a specific Discord permission (like Ban Members or Manage Messages). Use it in message flows to skip filters for mods, or to gate logic on someone other than the command invoker.

When to use this
  • For slash commands, checking {{input.user.id}} uses the invoker — no extra API call
  • Checking other users may require the Server Members privileged intent in the Discord Developer Portal
  • Administrators always take the Has branch
  • Pair with Condition on the Missing branch for swear-word filters and similar rules

On the canvas

This is what Has Permission looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🔐
Has Permission
base.member.has_permission
User
userIdrequired
{{input.user.id}}
permissionrequired
select
has
missing

Config fields

FieldTypeReqWhat it does
userId
{{input.user.id}}
textyesMember to check 👤
permissionselectyesPermission 🔑

Output ports

hasMember has this permission
missingMember lacks this permission or could not be checked

Supported permission flags

FlagWho typically has it
KICK_MEMBERSModerators
BAN_MEMBERSSenior moderators
MANAGE_CHANNELSAdmins
SEND_MESSAGESAll members
MANAGE_MESSAGESModerators — delete / pin messages
READ_MESSAGE_HISTORYAll members
MANAGE_ROLESAdmins
MODERATE_MEMBERSModerators — timeout members
ADMINISTRATORServer owner / senior admins
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
import { PermissionFlagsBits } from "discord.js";

const member = await guild.members.fetch(userId);
if (member.permissions.has(PermissionFlagsBits.ManageMessages)) {
  // Has port — skip filters for mods
} else {
  // Missing port
}