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

Calamity.Types.Model.Guild.Role

Description

Guild roles

Documentation

data Role Source #

Instances

Instances details
Eq Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

(==) :: Role -> Role -> Bool #

(/=) :: Role -> Role -> Bool #

Show Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

showsPrec :: Int -> Role -> ShowS #

show :: Role -> String #

showList :: [Role] -> ShowS #

Generic Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Associated Types

type Rep Role :: Type -> Type #

Methods

from :: Role -> Rep Role x #

to :: Rep Role x -> Role #

ToJSON Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

FromJSON Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

NFData Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

rnf :: Role -> () #

TextShow Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Mentionable Role Source # 
Instance details

Defined in Calamity.Utils.Message

Methods

mention :: Role -> Text Source #

HasID Role Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

(Member (CacheEff :: (Type -> Type) -> Type -> Type) r, CalamityCommandContext c) => ParameterParser Role c r

ParameterParser for roles in the guild the command was invoked in, this only looks in the cache. Use Snowflake Role and use upgrade if you want to allow fetching from http.

Instance details

Defined in Calamity.Commands.CalamityParsers

Associated Types

type ParserResult Role

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

parse :: Sem (ParserEffs c r) (ParserResult Role)

Upgradeable Role (Snowflake Guild, Snowflake Role) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). BotC r => (Snowflake Guild, Snowflake Role) -> Sem r (Maybe Role) Source #

ToMessage (TMention Role) Source #

Add a Role id to the list of allowed role mentions

Instance details

Defined in Calamity.Types.Tellable

Mentionable (Snowflake Role) Source # 
Instance details

Defined in Calamity.Utils.Message

ParameterParser (Snowflake Role) c r

Accepts both plain IDs and mentions

Instance details

Defined in Calamity.Commands.CalamityParsers

Associated Types

type ParserResult (Snowflake Role)

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

parse :: Sem (ParserEffs c r) (ParserResult (Snowflake Role))

type Rep Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

type ParserResult Role 
Instance details

Defined in Calamity.Commands.CalamityParsers

type ParserResult Role = Role
type ParserResult (Snowflake Role) 
Instance details

Defined in Calamity.Commands.CalamityParsers

type ParserResult (Snowflake Role) = Snowflake Role