| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Telegram.Bot.API.Methods
Synopsis
- type GetMe = "getMe" :> Get '[JSON] (Response User)
- getMe :: ClientM (Response User)
- type SendMessage = "sendMessage" :> (ReqBody '[JSON] SendMessageRequest :> Post '[JSON] (Response Message))
- sendMessage :: SendMessageRequest -> ClientM (Response Message)
- data SomeChatId
- = SomeChatId ChatId
- | SomeChatUsername Text
- data SomeReplyMarkup
- data ParseMode
- data SendMessageRequest = SendMessageRequest {}
Available methods
getMe
getMe :: ClientM (Response User) Source #
A simple method for testing your bot's auth token.
Requires no parameters.
Returns basic information about the bot in form of a User object.
sendMessage
type SendMessage = "sendMessage" :> (ReqBody '[JSON] SendMessageRequest :> Post '[JSON] (Response Message)) Source #
sendMessage :: SendMessageRequest -> ClientM (Response Message) Source #
Use this method to send text messages.
On success, the sent Message is returned.
data SomeChatId Source #
Unique identifier for the target chat
or username of the target channel (in the format @channelusername).
Constructors
| SomeChatId ChatId | Unique chat ID. |
| SomeChatUsername Text | Username of the target channel. |
Instances
| Generic SomeChatId Source # | |
Defined in Telegram.Bot.API.Methods Associated Types type Rep SomeChatId :: Type -> Type # | |
| ToJSON SomeChatId Source # | |
Defined in Telegram.Bot.API.Methods Methods toJSON :: SomeChatId -> Value # toEncoding :: SomeChatId -> Encoding # toJSONList :: [SomeChatId] -> Value # toEncodingList :: [SomeChatId] -> Encoding # | |
| FromJSON SomeChatId Source # | |
Defined in Telegram.Bot.API.Methods | |
| type Rep SomeChatId Source # | |
Defined in Telegram.Bot.API.Methods type Rep SomeChatId = D1 (MetaData "SomeChatId" "Telegram.Bot.API.Methods" "telegram-bot-simple-0.2.0-1M8rmfx2QZj8E0BosnPvnR" False) (C1 (MetaCons "SomeChatId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ChatId)) :+: C1 (MetaCons "SomeChatUsername" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))) | |
data SomeReplyMarkup Source #
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
Constructors
| SomeInlineKeyboardMarkup InlineKeyboardMarkup | |
| SomeReplyKeyboardMarkup ReplyKeyboardMarkup | |
| SomeReplyKeyboardRemove ReplyKeyboardRemove | |
| SomeForceReply ForceReply |
Instances
data SendMessageRequest Source #
Request parameters for sendMessage.
Constructors
| SendMessageRequest | |
Fields
| |