lambdabot-telegram-plugins-0.2.1: Lambdabot for Telegram
Safe HaskellNone
LanguageHaskell2010

Lambdabot.Plugin.Telegram.Bot.Generic

Contents

Synopsis

Documentation

class GFromCommand command where Source #

Helper type class used to derive FromCommand via DeriveGeneric extension.

Methods

gGetMessage :: command proxy -> Msg Source #

gGetPrefix :: command proxy -> Text Source #

Instances

Instances details
GFromCommand (V1 :: Type -> Type) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

gGetMessage :: V1 proxy -> Msg Source #

gGetPrefix :: V1 proxy -> Text Source #

FromCommand c => GFromCommand (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

gGetMessage :: K1 i c proxy -> Msg Source #

gGetPrefix :: K1 i c proxy -> Text Source #

(GFromCommand f, GFromCommand g) => GFromCommand (f :+: g) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

gGetMessage :: (f :+: g) proxy -> Msg Source #

gGetPrefix :: (f :+: g) proxy -> Text Source #

(GFromCommand f, GFromCommand g) => GFromCommand (f :*: g) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

gGetMessage :: (f :*: g) proxy -> Msg Source #

gGetPrefix :: (f :*: g) proxy -> Text Source #

GFromCommand f => GFromCommand (M1 D t f) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

gGetMessage :: M1 D t f proxy -> Msg Source #

gGetPrefix :: M1 D t f proxy -> Text Source #

(Constructor t, GFromCommand f) => GFromCommand (M1 C t f) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

gGetMessage :: M1 C t f proxy -> Msg Source #

gGetPrefix :: M1 C t f proxy -> Text Source #

GFromCommand f => GFromCommand (M1 S t f) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

gGetMessage :: M1 S t f proxy -> Msg Source #

gGetPrefix :: M1 S t f proxy -> Text Source #

class FromCommand command where Source #

Minimal complete definition

Nothing

Methods

getMessage :: command -> Msg Source #

default getMessage :: (Generic command, GFromCommand (Rep command)) => command -> Msg Source #

getPrefix :: command -> Text Source #

default getPrefix :: (Generic command, GFromCommand (Rep command)) => command -> Text Source #

Instances

Instances details
FromCommand Msg Source #

Type class to identify the essence of incoming command and transform it to Msg transport type.

Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

FromCommand SourceCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand HelpCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand VersionCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand UnmtlCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand UndoCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand TypeCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand SystemCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand PrettyCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand PointfulCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand PlCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand InstancesCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand HoogleCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand HaddockCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand FreeCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand DjinnCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand CheckCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

FromCommand EvalCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

(KnownSymbol postfix, FromCommand a, modifier ~ 'AtEnd postfix) => FromCommand (MaybeWith modifier a) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

getMessage :: MaybeWith modifier a -> Msg Source #

getPrefix :: MaybeWith modifier a -> Text Source #

fromCommand :: FromCommand command => command -> Msg Source #

Transform incoming telegram command into Msg.

Helpers

toKebabCase :: Text -> Text Source #

Helper to transform text into kebab case.

data MaybeWith (modifier :: Modifier) a Source #

Constructors

MaybeWith a 

Instances

Instances details
(KnownSymbol postfix, FromCommand a, modifier ~ 'AtEnd postfix) => FromCommand (MaybeWith modifier a) Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot.Generic

Methods

getMessage :: MaybeWith modifier a -> Msg Source #

getPrefix :: MaybeWith modifier a -> Text Source #

data Modifier Source #

Constructors

AtEnd Symbol