Skip to content

$hasPermsInChannel

$hasPermsInChannel will check if the user has one of the required permission in the given channel.

Usage

$hasPermsInChannel[channelID;userOrRoleID;...perms]

Parameters

FieldTypeDescriptionRequired
channelDnumberID of the channel where the client checks the permissions.true
userOrRoleIDnumberID of the user or role.true
…permsstringPermissions.true

Discord API Permissions

Permission
createinvitePermission to create guild invites
kickPermission to kick guild members
banPermission to ban guild members
administratorAdministrator Permissions
managechannelPermission to manage guild channels
manageguildPermissions to modify server settings
addreactionsPermissions to add reactions
viewauditlogPermission to view the guild’s audit log
priorityspeakerPriority Speaker
streamPermission to stream in voice channels
viewchannelPermission to view a certain channel
sendmessagesPermission to send messages in a certain channel
sendttsPermission to send Text-To-Speech messages
managemessagesPermission to manage messages
embedlinksPermission to embed links
attachfilesPermission to attach files
readmessagehistoryPermission to read the message history within a certain channel
mentioneveryonePermission to mention @everyone and all roles
externalemojisPermission to use external emojis
viewguildinsightsPermission to view guild insights
connectPermission to connect to voice channels and stages
mutemembersPermission to mute members in voice channels
deafenmembersPermission to deafen members in voice channels
movemembersPermission to move members between voice channels
usevadPermission to use voice-activity-detection
changenicknamePermission to change your own nickname
managenicknamesPermission to manage other members nicknames
managerolesPermission to manage roles
managewebhooksPermission to manage webhooks
manageemojisandstickersPermission to manage emojis and stickers
useappcmdsPermission to use application commands
requesttospeakPermission to use request-to-speak in stages
manageeventsPermission to manage events
managethreadsPermission to manage threads
usepublicthreadsPermission to use public threads
useprivatethreadsPermission to use private threads
createpublicthreadsPermission to create public threads
createprivatethreadsPermission to create private threads
externalstickersPermission to use extrernal stickers
sendmessageinthreadsPermission to send messages in threads
startembeddedactivitiesPermission to start activities within voice channels
moderatemembersPermission to timeout and remove timeouts from guild members

Example(s)

This will return true when the author has send messages permissions and return false when they don’t have those:

1
client.command({
2
name: "hasPermsInChannel",
3
code: `
4
$hasPermsInChannel[$channelID;$authorID;sendmessages]
5
`
6
});