Documentation ¶
Index ¶
Constants ¶
View Source
const ( PermCreateInstantInvite = 1 << iota PermKickMembers PermBanMembers PermAdministrator PermManageChannels PermManageServer PermAddReactions PermViewAuditLogs )
First few permission constants (All permission constants are from discordgo)
View Source
const ( PermChangeNickname = 1 << (iota + 26) PermManageNicknames PermManageRoles PermManageWebhooks PermManageEmojis )
Second batch of permission constants
View Source
const ( PermReadMessages = 1 << (iota + 10) PermSendMessages PermSendTTSMessages PermManageMessages PermEmbedLinks PermAttachFiles PermReadMessageHistory PermMentionEveryone PermUseExternalEmojis )
Third batch of permission constants
View Source
const ( PermConnect = 1 << (iota + 20) PermSpeak PermMuteMembers PermDeafenMembers PermMoveMembers PermUseVoiceActivity )
Last few permission constants
Variables ¶
View Source
var ErrAlreadyRunning = errors.New("permcalc prompt already running")
ErrAlreadyRunning is thrown when you attempt to show a prompt when there already is one displayed.
View Source
var PermOrder = []int{ PermAdministrator, PermViewAuditLogs, PermManageRoles, PermKickMembers, PermCreateInstantInvite, PermManageNicknames, PermManageWebhooks, PermManageServer, PermManageChannels, PermBanMembers, PermChangeNickname, PermManageEmojis, PermReadMessages, PermSendTTSMessages, PermEmbedLinks, PermReadMessageHistory, PermUseExternalEmojis, PermSendMessages, PermManageMessages, PermAttachFiles, PermMentionEveryone, PermAddReactions, PermConnect, PermMuteMembers, PermMoveMembers, PermSpeak, PermDeafenMembers, PermUseVoiceActivity, }
PermOrder is all permissions, sorted by order.
View Source
var PermStrings = map[int]string{ PermAdministrator: "Administrator", PermViewAuditLogs: "View Audit Logs", PermManageRoles: "Manage Roles", PermKickMembers: "Kick Members", PermCreateInstantInvite: "Create Instant Invite", PermManageNicknames: "Manage Nicknames", PermManageWebhooks: "Manage Webhooks", PermManageServer: "Manage Server", PermManageChannels: "Manage Channels", PermBanMembers: "Ban Members", PermChangeNickname: "Change Nickname", PermManageEmojis: "Manage Emojis", PermReadMessages: "Read Messages", PermSendTTSMessages: "Send TTS Messages", PermEmbedLinks: "Embed Links", PermReadMessageHistory: "Read Message History", PermUseExternalEmojis: "Use External Emojis", PermSendMessages: "Send Messages", PermManageMessages: "Manage Messages", PermAttachFiles: "Attach Files", PermMentionEveryone: "Mention Everyone", PermAddReactions: "Add Reactions", PermConnect: "Connect", PermMuteMembers: "Mute Members", PermMoveMembers: "Move Members", PermSpeak: "Speak", PermDeafenMembers: "Deafen Members", PermUseVoiceActivity: "Use Voice Activity", }
PermStrings the name for all permissions.
Functions ¶
func PromptPerm ¶
PromptPerm shows the permission calculator and returns whatever the user checked.
Types ¶
Click to show internal directories.
Click to hide internal directories.