calamity-0.1.28.4: A library for writing discord bots in haskell
Safe HaskellNone
LanguageHaskell2010

Calamity.Utils.Permissions

Description

Permission utilities

Synopsis

Documentation

class PermissionsIn a where Source #

Things that Members have Permissions in

Methods

permissionsIn :: a -> Member -> Permissions Source #

Calculate a Member's Permissions in something

If permissions could not be calculated because something couldn't be found in the cache, this will return an empty set of permissions. Use permissionsIn' if you want to handle cases where something might not exist in cache.

Instances

Instances details
PermissionsIn Guild Source #

A Member's Permissions in a guild are just their roles

Instance details

Defined in Calamity.Utils.Permissions

PermissionsIn (Guild, GuildChannel) Source #

A Member's Permissions in a channel are their roles and overwrites

Instance details

Defined in Calamity.Utils.Permissions

class PermissionsIn' a where Source #

A variant of PermissionsIn that will use the cache/http.

Methods

permissionsIn' :: (BotC r, HasID User u) => a -> u -> Sem r Permissions Source #

Calculate the permissions of something that has a User id

Instances

Instances details
PermissionsIn' Guild Source #

A Member's Permissions in a guild are just their roles

Instance details

Defined in Calamity.Utils.Permissions

Methods

permissionsIn' :: forall (r :: [(Type -> Type) -> Type -> Type]) u. (BotC r, HasID User u) => Guild -> u -> Sem r Permissions Source #

PermissionsIn' GuildChannel Source #

A User's Permissions in a channel are their roles and overwrites

This will fetch the guild from the cache or http as needed

Instance details

Defined in Calamity.Utils.Permissions

Methods

permissionsIn' :: forall (r :: [(Type -> Type) -> Type -> Type]) u. (BotC r, HasID User u) => GuildChannel -> u -> Sem r Permissions Source #

PermissionsIn' (Snowflake Guild) Source #

A Member's Permissions in a guild are just their roles

This will fetch the guild from the cache or http as needed

Instance details

Defined in Calamity.Utils.Permissions

Methods

permissionsIn' :: forall (r :: [(Type -> Type) -> Type -> Type]) u. (BotC r, HasID User u) => Snowflake Guild -> u -> Sem r Permissions Source #

PermissionsIn' (Snowflake GuildChannel) Source #

A Member's Permissions in a channel are their roles and overwrites

This will fetch the guild and channel from the cache or http as needed

Instance details

Defined in Calamity.Utils.Permissions

Methods

permissionsIn' :: forall (r :: [(Type -> Type) -> Type -> Type]) u. (BotC r, HasID User u) => Snowflake GuildChannel -> u -> Sem r Permissions Source #