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

Calamity.Commands.CalamityParsers

Description

ParameterParser instances for calamity models

Orphan instances

(Member (CacheEff :: (Type -> Type) -> Type -> Type) r, CalamityCommandContext c) => ParameterParser GuildChannel c r Source #

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

Instance details

Associated Types

type ParserResult GuildChannel

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

(Member (CacheEff :: (Type -> Type) -> Type -> Type) r, CalamityCommandContext c) => ParameterParser Emoji c r Source #

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

Instance details

Associated Types

type ParserResult Emoji

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

ParameterParser RawEmoji c r Source #

Parses both discord emojis, and unicode emojis

Instance details

Associated Types

type ParserResult RawEmoji

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

Member (CacheEff :: (Type -> Type) -> Type -> Type) r => ParameterParser Guild c r Source #

ParameterParser for guilds, this only looks in the cache. Use Snowflake Guild and use upgrade if you want to allow fetching from http.

Instance details

Associated Types

type ParserResult Guild

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

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

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

Instance details

Associated Types

type ParserResult Member

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

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

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

Associated Types

type ParserResult Role

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

Member (CacheEff :: (Type -> Type) -> Type -> Type) r => ParameterParser User c r Source #

ParameterParser for users, this only looks in the cache. Use Snowflake User and use upgrade if you want to allow fetching from http.

Instance details

Associated Types

type ParserResult User

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

ParameterParser (Snowflake Channel) c r Source #

Accepts both plain IDs and mentions

Instance details

Associated Types

type ParserResult (Snowflake Channel)

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

ParameterParser (Snowflake Emoji) c r Source #

Accepts both plain IDs and uses of emoji

Instance details

Associated Types

type ParserResult (Snowflake Emoji)

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

ParameterParser (Snowflake Member) c r Source #

Accepts both plain IDs and mentions

Instance details

Associated Types

type ParserResult (Snowflake Member)

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

ParameterParser (Snowflake Role) c r Source #

Accepts both plain IDs and mentions

Instance details

Associated Types

type ParserResult (Snowflake Role)

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

ParameterParser (Snowflake User) c r Source #

Accepts both plain IDs and mentions

Instance details

Associated Types

type ParserResult (Snowflake User)

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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

Typeable (Snowflake a) => ParameterParser (Snowflake a) c r Source # 
Instance details

Associated Types

type ParserResult (Snowflake a)

Methods

parameterInfo :: ParameterInfo

parameterDescription :: Text

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