You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
disgoman/types.go

56 lines
2.0 KiB

package disgoman
/* types.go
* Defines function types and other types
*
* Disgoman (c) 2020 Dusty.P/dustinpianalto
*/
// Function to invoke for command
type CommandInvokeFunc func(Context, []string) error
// Function to get prefixes
type PrefixesFunc func(string) []string
// Function to run on command error
type OnErrorFunc func(Context, string, error)
// Permission type to help with managing permissions for commands
type Permission int
// Defining permissions based on the Discord API
const (
PermissionAdministrator Permission = 8
PermissionViewAuditLog Permission = 128
PermissionViewServerInsights Permission = 524288
PermissionManageServer Permission = 32
PermissionManageRoles Permission = 268435456
PermissionManageChannels Permission = 16
PermissionKickMembers Permission = 2
PermissionBanMembers Permission = 4
PermissionCreateInstantInvite Permission = 1
PermissionChangeNickname Permission = 67108864
PermissionManageNicknames Permission = 134217728
PermissionManageEmojis Permission = 1073741824
PermissionManageWebhooks Permission = 536870912
PermissionViewChannels Permission = 1024
PermissionMessagesSend Permission = 2048
PermissionMessagesSendTTS Permission = 4096
PermissionMessagesManage Permission = 8192
PermissionMessagesEmbedLinks Permission = 16384
PermissionMessagesAttachFiles Permission = 32768
PermissionMessagesReadHistory Permission = 65536
PermissionMessagesMentionEveryone Permission = 131072
PermissionMessagesUseExternalEmojis Permission = 262144
PermissionMessagesAddReactions Permission = 64
PermissionVoiceConnect Permission = 1048576
PermissionVoiceSpeak Permission = 2097152
PermissionVoiceMuteMembers Permission = 4194304
PermissionVoiceDeafenMembers Permission = 8388608
PermissionVoiceUseMembers Permission = 16777216
PermissionVoiceUseActivity Permission = 33554432
PermissionVoicePrioritySpeaker Permission = 256
)