Skip to content

$hasAnyPerm

$hasAnyPerm will check if the user has one of the required permissions.

Usage

$hasAnyPerm[guildID;userID;...perms]

Parameters

FieldTypeDescriptionRequired
guildIDnumberID of the guild where the client checks the permissions.true
userIDnumberID of the user.false
…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 manage messages or kick permissions and return false when they don’t have any of those:

1
client.command({
2
name: "hasAnyPerm",
3
code: `
4
$hasAnyPerm[$guildID;$authorID;kick;managemessages]
5
`
6
});