Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Discord.Internal.Types.RolePermissions
Synopsis
- data PermissionFlag
- = CREATE_INSTANT_INVITE
- | KICK_MEMBERS
- | BAN_MEMBERS
- | ADMINISTRATOR
- | MANAGE_CHANNELS
- | MANAGE_GUILD
- | ADD_REACTIONS
- | VIEW_AUDIT_LOG
- | PRIORITY_SPEAKER
- | STREAM
- | VIEW_CHANNEL
- | SEND_MESSAGES
- | SEND_TTS_MESSAGES
- | MANAGE_MESSAGES
- | EMBED_LINKS
- | ATTACH_FILES
- | READ_MESSAGE_HISTORY
- | MENTION_EVERYONE
- | USE_EXTERNAL_EMOJIS
- | VIEW_GUILD_INSIGHT
- | CONNECT
- | SPEAK
- | MUTE_MEMBERS
- | DEAFEN_MEMBERS
- | MOVE_MEMBERS
- | USE_VAD
- | CHANGE_NICKNAME
- | MANAGE_NICKNAMES
- | MANAGE_ROLES
- | MANAGE_WEBHOOKS
- | MANAGE_EMOJIS_AND_STICKERS
- | USE_APPLICATION_COMMANDS
- | REQUEST_TO_SPEAK
- | MANAGE_EVENTS
- | MANAGE_THREADS
- | CREATE_PUBLIC_THREADS
- | CREATE_PRIVATE_THREADS
- | USE_EXTERNAL_STICKERS
- | SEND_MESSAGES_IN_THREADS
- | USE_EMBEDDED_ACTIVITIES
- | MODERATE_MEMBERS
- hasRolePermissions :: [PermissionFlag] -> RolePermissions -> Bool
- hasRolePermission :: PermissionFlag -> RolePermissions -> Bool
- newRolePermissions :: [PermissionFlag] -> RolePermissions
- newRolePermission :: PermissionFlag -> RolePermissions
- setRolePermissions :: [PermissionFlag] -> RolePermissions -> RolePermissions
- setRolePermission :: PermissionFlag -> RolePermissions -> RolePermissions
- clearRolePermissions :: [PermissionFlag] -> RolePermissions -> RolePermissions
- clearRolePermission :: PermissionFlag -> RolePermissions -> RolePermissions
- hasGuildMemberPermission :: Guild -> GuildMember -> PermissionFlag -> Bool
Documentation
data PermissionFlag Source #
Constructors
Instances
hasRolePermissions :: [PermissionFlag] -> RolePermissions -> Bool Source #
Check if a given role has all the permissions
hasRolePermission :: PermissionFlag -> RolePermissions -> Bool Source #
Check if a given role has the permission
newRolePermissions :: [PermissionFlag] -> RolePermissions Source #
Replace a users rolePerms with a complete new set of permissions
newRolePermission :: PermissionFlag -> RolePermissions Source #
Get the RolePermissions of a single PermissionFlag
setRolePermissions :: [PermissionFlag] -> RolePermissions -> RolePermissions Source #
Update RolePermissions with new permissions
setRolePermission :: PermissionFlag -> RolePermissions -> RolePermissions Source #
Set a certain permission flag This method doesn't lose the other already present permissions
clearRolePermissions :: [PermissionFlag] -> RolePermissions -> RolePermissions Source #
Unset Permissions from RolePermissions
clearRolePermission :: PermissionFlag -> RolePermissions -> RolePermissions Source #
Remove a permission from a user by clearing the bit
hasGuildMemberPermission :: Guild -> GuildMember -> PermissionFlag -> Bool Source #
Check if any Role of an GuildMember has the needed permission If the result of roleIdToRole is Nothing, it prepends a False Otherwise it checks for the needed permission