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

Lambdabot.Plugin.Telegram.Bot

Synopsis

Documentation

type Model = TelegramState Source #

Telegram Model.

data Action Source #

Supported actions: * send everything obtained from user to lambdabot ("proxy" command). * send exact module command to lambdabot. * send response back to user.

data EvalCmd Source #

Supported commands from eval plugin.

Constructors

Let Msg 
Undefine Msg 
Run Msg 

Instances

Instances details
Generic EvalCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep EvalCmd :: Type -> Type #

Methods

from :: EvalCmd -> Rep EvalCmd x #

to :: Rep EvalCmd x -> EvalCmd #

FromCommand EvalCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep EvalCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep EvalCmd = D1 ('MetaData "EvalCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Let" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: (C1 ('MetaCons "Undefine" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "Run" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg))))

data CheckCmd Source #

Supported commands from check plugin.

Constructors

Check Msg 

Instances

Instances details
Generic CheckCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep CheckCmd :: Type -> Type #

Methods

from :: CheckCmd -> Rep CheckCmd x #

to :: Rep CheckCmd x -> CheckCmd #

FromCommand CheckCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep CheckCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep CheckCmd = D1 ('MetaData "CheckCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Check" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data DjinnCmd Source #

Supported commands from djinn plugin.

Instances

Instances details
Generic DjinnCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep DjinnCmd :: Type -> Type #

Methods

from :: DjinnCmd -> Rep DjinnCmd x #

to :: Rep DjinnCmd x -> DjinnCmd #

FromCommand DjinnCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep DjinnCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

data FreeCmd Source #

Supported commands from free plugin.

Constructors

Free Msg 

Instances

Instances details
Generic FreeCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep FreeCmd :: Type -> Type #

Methods

from :: FreeCmd -> Rep FreeCmd x #

to :: Rep FreeCmd x -> FreeCmd #

FromCommand FreeCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep FreeCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep FreeCmd = D1 ('MetaData "FreeCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Free" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data HaddockCmd Source #

Supported commands from haddock plugin.

Constructors

Index Msg 

Instances

Instances details
Generic HaddockCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep HaddockCmd :: Type -> Type #

FromCommand HaddockCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep HaddockCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep HaddockCmd = D1 ('MetaData "HaddockCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Index" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data HoogleCmd Source #

Supported commands from hoogle plugin.

Constructors

Hoogle Msg 

Instances

Instances details
Generic HoogleCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep HoogleCmd :: Type -> Type #

FromCommand HoogleCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep HoogleCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep HoogleCmd = D1 ('MetaData "HoogleCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Hoogle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data InstancesCmd Source #

Supported commands from instances plugin.

Instances

Instances details
Generic InstancesCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep InstancesCmd :: Type -> Type #

FromCommand InstancesCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep InstancesCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep InstancesCmd = D1 ('MetaData "InstancesCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Instances" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "InstancesImporting" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data PlCmd Source #

Supported commands from pl plugin.

Constructors

Pl Msg 
PlResume Msg 

Instances

Instances details
Generic PlCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep PlCmd :: Type -> Type #

Methods

from :: PlCmd -> Rep PlCmd x #

to :: Rep PlCmd x -> PlCmd #

FromCommand PlCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep PlCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep PlCmd = D1 ('MetaData "PlCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Pl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "PlResume" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data PointfulCmd Source #

Supported commands from pointful plugin.

Instances

Instances details
Generic PointfulCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep PointfulCmd :: Type -> Type #

FromCommand PointfulCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep PointfulCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

data PrettyCmd Source #

Supported commands from pretty plugin.

Constructors

Pretty Msg 

Instances

Instances details
Generic PrettyCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep PrettyCmd :: Type -> Type #

FromCommand PrettyCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep PrettyCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep PrettyCmd = D1 ('MetaData "PrettyCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Pretty" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data SystemCmd Source #

Supported commands from system plugin.

Instances

Instances details
Generic SystemCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep SystemCmd :: Type -> Type #

FromCommand SystemCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep SystemCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

data TypeCmd Source #

Supported commands from type plugin.

Constructors

Type Msg 
Kind Msg 

Instances

Instances details
Generic TypeCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep TypeCmd :: Type -> Type #

Methods

from :: TypeCmd -> Rep TypeCmd x #

to :: Rep TypeCmd x -> TypeCmd #

FromCommand TypeCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep TypeCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep TypeCmd = D1 ('MetaData "TypeCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Type" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "Kind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data UndoCmd Source #

Supported commands from undo plugin.

Constructors

Undo Msg 
Do Msg 

Instances

Instances details
Generic UndoCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep UndoCmd :: Type -> Type #

Methods

from :: UndoCmd -> Rep UndoCmd x #

to :: Rep UndoCmd x -> UndoCmd #

FromCommand UndoCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep UndoCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep UndoCmd = D1 ('MetaData "UndoCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Undo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "Do" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data UnmtlCmd Source #

Supported commands from unmtl plugin.

Constructors

Unmtl Msg 

Instances

Instances details
Generic UnmtlCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep UnmtlCmd :: Type -> Type #

Methods

from :: UnmtlCmd -> Rep UnmtlCmd x #

to :: Rep UnmtlCmd x -> UnmtlCmd #

FromCommand UnmtlCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep UnmtlCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep UnmtlCmd = D1 ('MetaData "UnmtlCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Unmtl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data VersionCmd Source #

Supported commands from version plugin.

Constructors

Tgversion Msg 

Instances

Instances details
Generic VersionCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep VersionCmd :: Type -> Type #

FromCommand VersionCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep VersionCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep VersionCmd = D1 ('MetaData "VersionCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Tgversion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data HelpCmd Source #

Supported commands from help plugin.

Constructors

Help Msg 

Instances

Instances details
Generic HelpCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep HelpCmd :: Type -> Type #

Methods

from :: HelpCmd -> Rep HelpCmd x #

to :: Rep HelpCmd x -> HelpCmd #

FromCommand HelpCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep HelpCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep HelpCmd = D1 ('MetaData "HelpCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Help" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

data SourceCmd Source #

Supported commands from source plugin.

Constructors

Src Msg 

Instances

Instances details
Generic SourceCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

Associated Types

type Rep SourceCmd :: Type -> Type #

FromCommand SourceCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep SourceCmd Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Bot

type Rep SourceCmd = D1 ('MetaData "SourceCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Src" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))

updateToAction :: Model -> Update -> Maybe Action Source #

How to handle updates from Telegram.

handlePluginCommand :: FromCommand cmd => cmd -> Model -> Eff Action Model Source #

Extract Msg from incoming command and send to Lambdabot.

runTelegramBot :: Token -> TelegramState -> IO () Source #

Run Telegram bot.

helpCmd :: Text Source #

Help command text.