Skip to content

Instantly share code, notes, and snippets.

@supernovaplus
Last active March 23, 2021 13:07
Show Gist options
  • Save supernovaplus/c86fbf8a5c37577ee411d509efafaf3a to your computer and use it in GitHub Desktop.
Save supernovaplus/c86fbf8a5c37577ee411d509efafaf3a to your computer and use it in GitHub Desktop.
const discord_permissions = [["CREATE_INSTANT_INVITE",1],["KICK_MEMBERS *",2],["BAN_MEMBERS *",4],["ADMINISTRATOR *",8],["MANAGE_CHANNELS *",16],["MANAGE_GUILD *",32],["ADD_REACTIONS",64],["VIEW_AUDIT_LOG",128],["PRIORITY_SPEAKER",256],["STREAM",512],["VIEW_CHANNEL",1024],["SEND_MESSAGES",2048],["SEND_TTS_MESSAGES",4096],["MANAGE_MESSAGES *",8192],["EMBED_LINKS",16384],["ATTACH_FILES",32768],["READ_MESSAGE_HISTORY",65536],["MENTION_EVERYONE",131072],["USE_EXTERNAL_EMOJIS",262144],["VIEW_GUILD_INSIGHTS",524288],["CONNECT",1048576],["SPEAK",2097152],["MUTE_MEMBERS",4194304],["DEAFEN_MEMBERS",8388608],["MOVE_MEMBERS",16777216],["USE_VAD",33554432],["CHANGE_NICKNAME",67108864],["MANAGE_NICKNAMES",134217728],["MANAGE_ROLES *",268435456],["MANAGE_WEBHOOKS *",536870912],["MANAGE_EMOJIS *",1073741824]];
discord_permissions.forEach(perm=>{
console.log(perm[0], (discord_user_guild_permissions & perm[1]) === perm[1])
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment