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

Calamity.Commands.Parser

Description

Something that can parse user input

Synopsis

Documentation

class Typeable a => Parser (a :: Type) r where Source #

Minimal complete definition

parse

Associated Types

type ParserResult a Source #

type ParserResult a = a

Instances

Instances details
Parser Float r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Float Source #

Parser Int r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Int Source #

Parser Integer r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Integer Source #

Parser Natural r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Natural Source #

Parser Word r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Word Source #

Parser () r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult () Source #

Parser Text r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Text Source #

Parser Text r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Text Source #

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

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

Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Guild Source #

Parser Member r Source #

Parser 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

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Member Source #

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

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

Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult User Source #

Parser Role r Source #

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

Associated Types

type ParserResult Role Source #

Parser RawEmoji r Source #

Parses both discord emojis, and unicode emojis

Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult RawEmoji Source #

Parser Emoji r Source #

Parser 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

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Emoji Source #

Parser GuildChannel r Source #

Parser 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

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult GuildChannel Source #

Parser a r => Parser [a] r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult [a] Source #

Parser a r => Parser (Maybe a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Maybe a) Source #

(Parser a r, Typeable a) => Parser (NonEmpty a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (NonEmpty a) Source #

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

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake a) Source #

Parser (Snowflake Channel) r Source #

Accepts both plain IDs and mentions

Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake Channel) Source #

Parser (Snowflake Member) r Source #

Accepts both plain IDs and mentions

Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake Member) Source #

Parser (Snowflake User) r Source #

Accepts both plain IDs and mentions

Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake User) Source #

Parser (Snowflake Role) r Source #

Accepts both plain IDs and mentions

Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake Role) Source #

Parser (Snowflake Emoji) r Source #

Accepts both plain IDs and uses of emoji

Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake Emoji) Source #

(Semigroup (ParserResult a), Parser a r) => Parser (KleenePlusConcat a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleenePlusConcat a) Source #

Parser (KleenePlusConcat Text) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleenePlusConcat Text) Source #

Parser (KleenePlusConcat Text) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleenePlusConcat Text) Source #

(Monoid (ParserResult a), Parser a r) => Parser (KleeneStarConcat a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleeneStarConcat a) Source #

Parser (KleeneStarConcat Text) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleeneStarConcat Text) Source #

Parser (KleeneStarConcat Text) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleeneStarConcat Text) Source #

(Parser a r, Parser b r) => Parser (Either a b) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Either a b) Source #

(Parser a r, Parser b r) => Parser (a, b) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (a, b) Source #

(KnownSymbol s, Parser a r) => Parser (Named s a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Named s a) Source #

data Named (s :: Symbol) (a :: Type) Source #

A named parameter, used to attach the name s to a type in the command's help output

Instances

Instances details
(KnownSymbol s, Parser a r) => Parser (Named s a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Named s a) Source #

type ParserResult (Named s a) Source # 
Instance details

Defined in Calamity.Commands.Parser

data KleeneStarConcat (a :: Type) Source #

A parser that consumes zero or more of a then concatenates them together.

KleeneStarConcat Text therefore consumes all remaining input.

data KleenePlusConcat (a :: Type) Source #

A parser that consumes one or more of a then concatenates them together.

KleenePlusConcat Text therefore consumes all remaining input.

type ParserEffs r = State ParserState ': (Error (Text, Text) ': (Reader Context ': r)) Source #