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

Lambdabot.Plugin.Telegram.Shared

Synopsis

Documentation

data Msg Source #

Transport type used to communicate between Telegram and Lambdabot.

Constructors

Msg 

Fields

Instances

Instances details
Show Msg Source # 
Instance details

Defined in Lambdabot.Plugin.Telegram.Shared

Methods

showsPrec :: Int -> Msg -> ShowS #

show :: Msg -> String #

showList :: [Msg] -> ShowS #

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

data TelegramState Source #

Shared state between Lambdabot and Telegram.

type Telegram = ModuleT TelegramState LB Source #

Lambdabot Monad with embedded Telegram State.

readInput :: TelegramState -> IO Msg Source #

Read input message from Telegram bot on Lambdabot side.

readOutput :: TelegramState -> IO Msg Source #

Read output message from Lambdabot on Telegram bot side.

writeInput :: Msg -> TelegramState -> IO () Source #

Send input message to Lambdabot from Telegram bot side.

writeOutput :: Msg -> TelegramState -> IO () Source #

Send output message to Telegram bot from Lambdabot side.