Module

TelegramBot

Package
purescript-node-telegram-bot-api
Repository
justinwoo/purescript-node-telegram-bot-api

#TelegramEffects Source

type TelegramEffects e = (telegram :: TELEGRAM | e)

#Token Source

type Token = String

The Telegram Bot API Token.

#Options Source

type Options = { polling :: Boolean }

The Telegram Bot options.

#Message Source

newtype Message

The Telegram Message type. See https://core.telegram.org/bots/api#message

Constructors

Instances

#User Source

newtype User

The Telegram User type. See https://core.telegram.org/bots/api#user

Constructors

Instances

#Chat Source

newtype Chat

The Telegram Chat type. See https://core.telegram.org/bots/api#chat

Constructors

Instances

#Location Source

newtype Location

The Telegram Location type. See https://core.telegram.org/bots/api#location

Constructors

Instances

#TELEGRAM Source

#Bot Source

data Bot :: Type

#defaultOptions Source

#_connect Source

#connect Source

connect :: forall e. Token -> Eff (TelegramEffects e) Bot

#_sendMessage Source

#sendMessage Source

sendMessage :: forall e. Bot -> Int -> String -> Eff (TelegramEffects e) Unit

#onText Source

onText :: forall e. Bot -> Regex -> (F Message -> F Matches -> Eff (TelegramEffects e) Unit) -> (Eff (TelegramEffects e) Unit)

For adding a callback for on text matching a regex pattern.

#onMessage Source

onMessage :: forall e. Bot -> (F Message -> Eff (TelegramEffects e) Unit) -> (Eff (TelegramEffects e) Unit)

For adding a callback for all messages.

#_getMe Source

#getMe Source

getMe :: forall e. Bot -> (Aff (TelegramEffects e) (F User))

For adding a callback for all messages.

Modules
TelegramBot