BotMine›Developer Docs›Permissions
Lua Addon SDK
Permissions
Document and check runtime permissions for your addon.
Overview
Permissions describe which Discord actions an addon may perform. Request only permissions your addon actually needs, and explain them clearly in the addon description.
Available permissions
ADMINISTRATORMANAGE_SERVERMANAGE_CHANNELMANAGE_ROLESMANAGE_MESSAGESKICK_MEMBERSBAN_MEMBERSMODERATE_MEMBERSVIEW_CHANNELSEND_MESSAGESEMBED_LINKSATTACH_FILESADD_REACTIONSUSE_APPLICATION_COMMANDSCONNECTSPEAKMOVE_MEMBERSMUTE_MEMBERSDEAFEN_MEMBERS
Check permissions
luaif not event.hasPermission("MANAGE_MESSAGES") then event.replyEphemeral("You do not have permission for that.") return end event.reply("You can manage messages.")
Directly through the Discord API:
luaif discord.hasPermission(guildId, userId, "MANAGE_ROLES") then discord.addRole(guildId, userId, roleId, "Role action") end