calamity-0.8.0.0: A library for writing discord bots in haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Calamity.Types.Model.Guild.Role

Description

Guild roles

Documentation

data Role Source #

Instances

Instances details
FromJSON Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

ToJSON Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Show Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

showsPrec :: Int -> Role -> ShowS #

show :: Role -> String #

showList :: [Role] -> ShowS #

CalamityToJSON' Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

toPairs :: KeyValue kv => Role -> [Maybe kv] Source #

Mentionable Role Source # 
Instance details

Defined in Calamity.Utils.Message

Methods

mention :: Role -> Text Source #

Eq Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

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

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

TextShow Role Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

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)

(k ~ A_Lens, a ~ Colour Double, b ~ Colour Double) => LabelOptic "color" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Maybe RawEmoji, b ~ Maybe RawEmoji) => LabelOptic "emoji" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "hoist" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Maybe RoleIcon, b ~ Maybe RoleIcon) => LabelOptic "icon" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Snowflake Role, b ~ Snowflake Role) => LabelOptic "id" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "managed" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "mentionable" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "name" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Permissions, b ~ Permissions) => LabelOptic "permissions" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

(k ~ A_Lens, a ~ Int, b ~ Int) => LabelOptic "position" k Role Role a b Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Methods

labelOptic :: Optic k NoIx Role Role a b #

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 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

data RoleIcon Source #

Constructors

RoleIcon 

Fields

Instances

Instances details
Show RoleIcon Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

CDNAsset RoleIcon Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role

Eq RoleIcon Source # 
Instance details

Defined in Calamity.Types.Model.Guild.Role