telegram-bot-simple-0.5.2: Easy to use library for building Telegram bots.
Safe HaskellNone
LanguageHaskell2010

Telegram.Bot.Simple.BotApp

Synopsis

Documentation

data BotApp model action Source #

A bot application.

Constructors

BotApp 

Fields

data BotJob model action Source #

A background bot job.

Constructors

BotJob 

Fields

Instances

Instances details
Functor (BotJob model) Source # 
Instance details

Defined in Telegram.Bot.Simple.BotApp.Internal

Methods

fmap :: (a -> b) -> BotJob model a -> BotJob model b #

(<$) :: a -> BotJob model b -> BotJob model a #

startBot :: BotApp model action -> ClientEnv -> IO (Either ClientError ()) Source #

Start bot with update polling in the main thread.

startBot_ :: BotApp model action -> ClientEnv -> IO () Source #

Like startBot, but ignores result.

startBotAsync :: BotApp model action -> ClientEnv -> IO (action -> IO ()) Source #

Start bot with asynchronous polling. The result is a function that allows you to send actions directly to the bot.

startBotAsync_ :: BotApp model action -> ClientEnv -> IO () Source #

Like startBotAsync, but ignores result.

getEnvToken :: String -> IO Token Source #

Get a Token from environment variable.

Common use:

getEnvToken TELEGRAM_BOT_TOKEN