-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Easy to use library for building Telegram bots. -- -- Please see the README on Github at -- https://github.com/fizruk/telegram-bot-simple#readme @package telegram-bot-simple @version 0.3.2 module Telegram.Bot.API.Games module Telegram.Bot.API.InlineMode module Telegram.Bot.API.Internal.Utils deriveJSON' :: Name -> Q [Dec] gtoJSON :: forall a d f. (Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) => a -> Value gparseJSON :: forall a d f. (Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) => Value -> Parser a genericSomeToJSON :: (Generic a, GSomeJSON (Rep a)) => a -> Value genericSomeParseJSON :: (Generic a, GSomeJSON (Rep a)) => Value -> Parser a data Proxy3 d f a Proxy3 :: Proxy3 d f a jsonOptions :: String -> Options snakeFieldModifier :: String -> String -> String camelWords :: String -> [String] stripCommonPrefix :: Eq a => [a] -> [a] -> [a] wordsToCamel :: [String] -> String wordsToSnake :: [String] -> String capitalise :: String -> String stripCommonPrefixWords :: String -> String -> [String] class GSomeJSON f gsomeToJSON :: GSomeJSON f => f p -> Value gsomeParseJSON :: GSomeJSON f => Value -> Parser (f p) instance forall k (f :: k -> *) (d :: GHC.Generics.Meta). Telegram.Bot.API.Internal.Utils.GSomeJSON f => Telegram.Bot.API.Internal.Utils.GSomeJSON (GHC.Generics.D1 d f) instance (Data.Aeson.Types.ToJSON.ToJSON a, Data.Aeson.Types.FromJSON.FromJSON a) => Telegram.Bot.API.Internal.Utils.GSomeJSON (GHC.Generics.C1 c (GHC.Generics.S1 s (GHC.Generics.K1 i a))) instance forall k (f :: k -> *) (g :: k -> *). (Telegram.Bot.API.Internal.Utils.GSomeJSON f, Telegram.Bot.API.Internal.Utils.GSomeJSON g) => Telegram.Bot.API.Internal.Utils.GSomeJSON (f GHC.Generics.:+: g) module Telegram.Bot.API.Payments module Telegram.Bot.API.Stickers module Telegram.Bot.API.Types type RequiredQueryParam = QueryParam' '[Required, Strict] newtype Seconds Seconds :: Int32 -> Seconds -- | This object represents a Telegram user or bot. -- -- https://core.telegram.org/bots/api#user data User User :: UserId -> Bool -> Text -> Maybe Text -> Maybe Text -> Maybe Text -> User -- | Unique identifier for this user or bot. [userId] :: User -> UserId -- | True, if this user is a bot. [userIsBot] :: User -> Bool -- | User's or bot's first name. [userFirstName] :: User -> Text -- | User‘s or bot’s last name [userLastName] :: User -> Maybe Text -- | User‘s or bot’s username [userUsername] :: User -> Maybe Text -- | IETF language tag of the user's language [userLanguageCode] :: User -> Maybe Text -- | Unique identifier for this user or bot. newtype UserId UserId :: Int32 -> UserId -- | This object represents a chat. -- -- https://core.telegram.org/bots/api#chat data Chat Chat :: ChatId -> ChatType -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Bool -> Maybe ChatPhoto -> Maybe Text -> Maybe Text -> Maybe Message -> Maybe Text -> Maybe Bool -> Chat -- | Unique identifier for this chat. This number may be greater than 32 -- bits and some programming languages may have difficulty/silent defects -- in interpreting it. But it is smaller than 52 bits, so a signed 64 bit -- integer or double-precision float type are safe for storing this -- identifier. [chatId] :: Chat -> ChatId -- | Type of chat. [chatType] :: Chat -> ChatType -- | Title, for supergroups, channels and group chats [chatTitle] :: Chat -> Maybe Text -- | Username, for private chats, supergroups and channels if available [chatUsername] :: Chat -> Maybe Text -- | First name of the other party in a private chat [chatFirstName] :: Chat -> Maybe Text -- | Last name of the other party in a private chat [chatLastName] :: Chat -> Maybe Text -- | True if a group has ‘All Members Are Admins’ enabled. [chatAllMembersAreAdministrators] :: Chat -> Maybe Bool -- | Chat photo. Returned only in getChat. [chatPhoto] :: Chat -> Maybe ChatPhoto -- | Description, for supergroups and channel chats. Returned only in -- getChat. [chatDescription] :: Chat -> Maybe Text -- | Chat invite link, for supergroups and channel chats. Returned only in -- getChat. [chatInviteLink] :: Chat -> Maybe Text -- | Pinned message, for supergroups. Returned only in getChat. [chatPinnedMessage] :: Chat -> Maybe Message -- | For supergroups, name of group sticker set. Returned only in getChat. [chatStickerSetName] :: Chat -> Maybe Text -- | True, if the bot can change the group sticker set. Returned only in -- getChat. [chatCanSetStickerSet] :: Chat -> Maybe Bool -- | Unique identifier for this chat. newtype ChatId ChatId :: Integer -> ChatId -- | Type of chat. data ChatType ChatTypePrivate :: ChatType ChatTypeGroup :: ChatType ChatTypeSupergroup :: ChatType ChatTypeChannel :: ChatType -- | This object represents a message. data Message Message :: MessageId -> Maybe User -> POSIXTime -> Chat -> Maybe User -> Maybe Chat -> Maybe MessageId -> Maybe Text -> Maybe POSIXTime -> Maybe Message -> Maybe POSIXTime -> Maybe MediaGroupId -> Maybe Text -> Maybe Text -> Maybe [MessageEntity] -> Maybe [MessageEntity] -> Maybe Audio -> Maybe Document -> Maybe [PhotoSize] -> Maybe Video -> Maybe Voice -> Maybe VideoNote -> Maybe Text -> Maybe Contact -> Maybe Location -> Maybe Venue -> Maybe [User] -> Maybe User -> Maybe Text -> Maybe [PhotoSize] -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe ChatId -> Maybe ChatId -> Maybe Message -> Message -- | Unique message identifier inside this chat [messageMessageId] :: Message -> MessageId -- | Sender, empty for messages sent to channels [messageFrom] :: Message -> Maybe User -- | Date the message was sent in Unix time [messageDate] :: Message -> POSIXTime -- | Conversation the message belongs to [messageChat] :: Message -> Chat -- | For forwarded messages, sender of the original message [messageForwardFrom] :: Message -> Maybe User -- | For messages forwarded from channels, information about the original -- channel [messageForwardFromChat] :: Message -> Maybe Chat -- | For messages forwarded from channels, identifier of the original -- message in the channel [messageForwardFromMessageId] :: Message -> Maybe MessageId -- | For messages forwarded from channels, signature of the post author if -- present [messageForwardSignature] :: Message -> Maybe Text -- | For forwarded messages, date the original message was sent in Unix -- time [messageForwardDate] :: Message -> Maybe POSIXTime -- | For replies, the original message. Note that the Message object in -- this field will not contain further reply_to_message fields even if it -- itself is a reply. [messageReplyToMessage] :: Message -> Maybe Message -- | Date the message was last edited in Unix time [messageEditDate] :: Message -> Maybe POSIXTime -- | The unique identifier of a media message group this message belongs to [messageMediaGroupId] :: Message -> Maybe MediaGroupId -- | Signature of the post author for messages in channels [messageAuthorSignature] :: Message -> Maybe Text -- | For text messages, the actual UTF-8 text of the message, 0-4096 -- characters. [messageText] :: Message -> Maybe Text -- | For text messages, special entities like usernames, URLs, bot -- commands, etc. that appear in the text [messageEntities] :: Message -> Maybe [MessageEntity] -- | For messages with a caption, special entities like usernames, URLs, -- bot commands, etc. that appear in the caption [messageCaptionEntities] :: Message -> Maybe [MessageEntity] -- | Message is an audio file, information about the file [messageAudio] :: Message -> Maybe Audio -- | Message is a general file, information about the file [messageDocument] :: Message -> Maybe Document -- | Message is a photo, available sizes of the photo [messagePhoto] :: Message -> Maybe [PhotoSize] -- | Message is a video, information about the video [messageVideo] :: Message -> Maybe Video -- | Message is a voice message, information about the file [messageVoice] :: Message -> Maybe Voice -- | Message is a video note, information about the video message [messageVideoNote] :: Message -> Maybe VideoNote -- | Caption for the audio, document, photo, video or voice, 0-200 -- characters [messageCaption] :: Message -> Maybe Text -- | Message is a shared contact, information about the contact [messageContact] :: Message -> Maybe Contact -- | Message is a shared location, information about the location [messageLocation] :: Message -> Maybe Location -- | Message is a venue, information about the venue [messageVenue] :: Message -> Maybe Venue -- | New members that were added to the group or supergroup and information -- about them (the bot itself may be one of these members) [messageNewChatMembers] :: Message -> Maybe [User] -- | A member was removed from the group, information about them (this -- member may be the bot itself) [messageLeftChatMember] :: Message -> Maybe User -- | A chat title was changed to this value [messageNewChatTitle] :: Message -> Maybe Text -- | A chat photo was change to this value [messageNewChatPhoto] :: Message -> Maybe [PhotoSize] -- | Service message: the chat photo was deleted [messageDeleteChatPhoto] :: Message -> Maybe Bool -- | Service message: the group has been created [messageGroupChatCreated] :: Message -> Maybe Bool -- | Service message: the supergroup has been created. This field can‘t be -- received in a message coming through updates, because bot can’t be a -- member of a supergroup when it is created. It can only be found in -- reply_to_message if someone replies to a very first message in a -- directly created supergroup. [messageSupergroupChatCreated] :: Message -> Maybe Bool -- | Service message: the channel has been created. This field can‘t be -- received in a message coming through updates, because bot can’t be a -- member of a channel when it is created. It can only be found in -- reply_to_message if someone replies to a very first message in a -- channel. [messageChannelChatCreated] :: Message -> Maybe Bool -- | The group has been migrated to a supergroup with the specified -- identifier. This number may be greater than 32 bits and some -- programming languages may have difficulty/silent defects in -- interpreting it. But it is smaller than 52 bits, so a signed 64 bit -- integer or double-precision float type are safe for storing this -- identifier. [messageMigrateToChatId] :: Message -> Maybe ChatId -- | The supergroup has been migrated from a group with the specified -- identifier. This number may be greater than 32 bits and some -- programming languages may have difficulty/silent defects in -- interpreting it. But it is smaller than 52 bits, so a signed 64 bit -- integer or double-precision float type are safe for storing this -- identifier. [messageMigrateFromChatId] :: Message -> Maybe ChatId -- | Specified message was pinned. Note that the Message object in this -- field will not contain further reply_to_message fields even if it is -- itself a reply. [messagePinnedMessage] :: Message -> Maybe Message -- | Unique message identifier inside this chat. newtype MessageId MessageId :: Int32 -> MessageId -- | The unique identifier of a media message group a message belongs to. newtype MediaGroupId MediaGroupId :: Text -> MediaGroupId -- | This object represents one special entity in a text message. For -- example, hashtags, usernames, URLs, etc. data MessageEntity MessageEntity :: MessageEntityType -> Int32 -> Int32 -> Maybe Text -> Maybe User -> MessageEntity -- | Type of the entity. Can be mention (@username), hashtag, bot_command, -- url, email, bold (bold text), italic (italic text), underline -- (underlined text), strikethrough, code (monowidth string), pre -- (monowidth block), text_link (for clickable text URLs), text_mention -- (for users without usernames) [messageEntityType] :: MessageEntity -> MessageEntityType -- | Offset in UTF-16 code units to the start of the entity [messageEntityOffset] :: MessageEntity -> Int32 -- | Length of the entity in UTF-16 code units [messageEntityLength] :: MessageEntity -> Int32 -- | For “text_link” only, url that will be opened after user taps on the -- text [messageEntityUrl] :: MessageEntity -> Maybe Text -- | For “text_mention” only, the mentioned user [messageEntityUser] :: MessageEntity -> Maybe User -- | Type of the entity. Can be mention (@username), hashtag, bot_command, -- url, email, bold (bold text), italic (italic text), underline -- (underlined text), strikethrough, code (monowidth string), pre -- (monowidth block), text_link (for clickable text URLs), text_mention -- (for users without usernames), cashtag, phone_number data MessageEntityType MessageEntityMention :: MessageEntityType MessageEntityHashtag :: MessageEntityType MessageEntityBotCommand :: MessageEntityType MessageEntityUrl :: MessageEntityType MessageEntityEmail :: MessageEntityType MessageEntityBold :: MessageEntityType MessageEntityItalic :: MessageEntityType -- | See -- https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1text_entity_type_underline.html MessageEntityUnderline :: MessageEntityType -- | See -- https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1text_entity_type_strikethrough.html MessageEntityStrikethrough :: MessageEntityType MessageEntityCode :: MessageEntityType MessageEntityPre :: MessageEntityType MessageEntityTextLink :: MessageEntityType MessageEntityTextMention :: MessageEntityType -- | See -- https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1text_entity_type_cashtag.html. MessageEntityCashtag :: MessageEntityType -- | See -- https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1text_entity_type_phone_number.html. MessageEntityPhoneNumber :: MessageEntityType -- | This object represents one size of a photo or a file / sticker -- thumbnail. data PhotoSize PhotoSize :: FileId -> Int32 -> Int32 -> Maybe Int32 -> PhotoSize -- | Unique identifier for this file [photoSizeFileId] :: PhotoSize -> FileId -- | Photo width [photoSizeWidth] :: PhotoSize -> Int32 -- | Photo height [photoSizeHeight] :: PhotoSize -> Int32 -- | File size [photoSizeFileSize] :: PhotoSize -> Maybe Int32 -- | Unique identifier for this file. newtype FileId FileId :: Text -> FileId -- | This object represents an audio file to be treated as music by the -- Telegram clients. data Audio Audio :: FileId -> Seconds -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Int32 -> Audio -- | Unique identifier for this file [audioFileId] :: Audio -> FileId -- | Duration of the audio in seconds as defined by sender [audioDuration] :: Audio -> Seconds -- | Performer of the audio as defined by sender or by audio tags [audioPerformer] :: Audio -> Maybe Text -- | Title of the audio as defined by sender or by audio tags [audioTitle] :: Audio -> Maybe Text -- | MIME type of the file as defined by sender [audioMimeType] :: Audio -> Maybe Text -- | File size [audioFileSize] :: Audio -> Maybe Int32 -- | This object represents a general file (as opposed to photos, voice -- messages and audio files). data Document Document :: FileId -> Maybe PhotoSize -> Maybe Text -> Maybe Text -> Maybe Int32 -> Document -- | Unique file identifier [documentFileId] :: Document -> FileId -- | Document thumbnail as defined by sender [documentThumb] :: Document -> Maybe PhotoSize -- | Original filename as defined by sender [documentFileName] :: Document -> Maybe Text -- | MIME type of the file as defined by sender [documentMimeType] :: Document -> Maybe Text -- | File size [documentFileSize] :: Document -> Maybe Int32 -- | This object represents a video file. data Video Video :: FileId -> Int32 -> Int32 -> Seconds -> Maybe PhotoSize -> Maybe Text -> Maybe Int32 -> Video -- | Unique identifier for this file [videoFileId] :: Video -> FileId -- | Video width as defined by sender [videoWidth] :: Video -> Int32 -- | Video height as defined by sender [videoHeight] :: Video -> Int32 -- | Duration of the video in seconds as defined by sender [videoDuration] :: Video -> Seconds -- | Video thumbnail [videoThumb] :: Video -> Maybe PhotoSize -- | Mime type of a file as defined by sender [videoMimeType] :: Video -> Maybe Text -- | File size [videoFileSize] :: Video -> Maybe Int32 -- | This object represents a voice note. data Voice Voice :: FileId -> Seconds -> Maybe Text -> Maybe Int32 -> Voice -- | Unique identifier for this file [voiceFileId] :: Voice -> FileId -- | Duration of the audio in seconds as defined by sender [voiceDuration] :: Voice -> Seconds -- | MIME type of the file as defined by sender [voiceMimeType] :: Voice -> Maybe Text -- | File size [voiceFileSize] :: Voice -> Maybe Int32 -- | This object represents a video message (available in Telegram apps as -- of v.4.0). data VideoNote VideoNote :: Text -> Int32 -> Seconds -> Maybe PhotoSize -> Maybe Int32 -> VideoNote -- | Unique identifier for this file [videoNoteFileId] :: VideoNote -> Text -- | Video width and height as defined by sender [videoNoteLength] :: VideoNote -> Int32 -- | Duration of the video in seconds as defined by sender [videoNoteDuration] :: VideoNote -> Seconds -- | Video thumbnail [videoNoteThumb] :: VideoNote -> Maybe PhotoSize -- | File size [videoNoteFileSize] :: VideoNote -> Maybe Int32 -- | This object represents a phone contact. data Contact Contact :: Text -> Text -> Maybe Text -> Maybe UserId -> Contact -- | Contact's phone number [contactPhoneNumber] :: Contact -> Text -- | Contact's first name [contactFirstName] :: Contact -> Text -- | Contact's last name [contactLastName] :: Contact -> Maybe Text -- | Contact's user identifier in Telegram [contactUserId] :: Contact -> Maybe UserId -- | This object represents a point on the map. data Location Location :: Float -> Float -> Location -- | Longitude as defined by sender [locationLongitude] :: Location -> Float -- | Latitude as defined by sender [locationLatitude] :: Location -> Float -- | This object represents a venue. data Venue Venue :: Location -> Text -> Text -> Maybe Text -> Venue -- | Venue location [venueLocation] :: Venue -> Location -- | Name of the venue [venueTitle] :: Venue -> Text -- | Address of the venue [venueAddress] :: Venue -> Text -- | Foursquare identifier of the venue [venueFoursquareId] :: Venue -> Maybe Text -- | This object represent a user's profile pictures. data UserProfilePhotos UserProfilePhotos :: Int32 -> [[PhotoSize]] -> UserProfilePhotos -- | Total number of profile pictures the target user has [userProfilePhotosTotalCount] :: UserProfilePhotos -> Int32 -- | Requested profile pictures (in up to 4 sizes each) [userProfilePhotosPhotos] :: UserProfilePhotos -> [[PhotoSize]] -- | This object represents a file ready to be downloaded. The file can be -- downloaded via the link -- https://api.telegram.org/file/bot<token>/<file_path>. -- It is guaranteed that the link will be valid for at least 1 hour. When -- the link expires, a new one can be requested by calling getFile. data File File :: FileId -> Maybe Int32 -> Maybe Text -> File -- | Unique identifier for this file [fileFileId] :: File -> FileId -- | File size, if known [fileFileSize] :: File -> Maybe Int32 -- | File path. Use -- https://api.telegram.org/file/bot<token>/<file_path> -- to get the file. [fileFilePath] :: File -> Maybe Text -- | This object represents a custom keyboard with reply options (see -- Introduction to bots for details and examples). data ReplyKeyboardMarkup ReplyKeyboardMarkup :: [[KeyboardButton]] -> Maybe Bool -> Maybe Bool -> Maybe Bool -> ReplyKeyboardMarkup -- | Array of button rows, each represented by an Array of KeyboardButton -- objects [replyKeyboardMarkupKeyboard] :: ReplyKeyboardMarkup -> [[KeyboardButton]] -- | Requests clients to resize the keyboard vertically for optimal fit -- (e.g., make the keyboard smaller if there are just two rows of -- buttons). Defaults to false, in which case the custom keyboard is -- always of the same height as the app's standard keyboard. [replyKeyboardMarkupResizeKeyboard] :: ReplyKeyboardMarkup -> Maybe Bool -- | Requests clients to hide the keyboard as soon as it's been used. The -- keyboard will still be available, but clients will automatically -- display the usual letter-keyboard in the chat – the user can press a -- special button in the input field to see the custom keyboard again. -- Defaults to false. [replyKeyboardMarkupOneTimeKeyboard] :: ReplyKeyboardMarkup -> Maybe Bool -- | Use this parameter if you want to show the keyboard to specific users -- only. Targets: 1) users that are @mentioned in the text of the Message -- object; 2) if the bot's message is a reply (has reply_to_message_id), -- sender of the original message. [replyKeyboardMarkupSelective] :: ReplyKeyboardMarkup -> Maybe Bool -- | This object represents one button of the reply keyboard. For simple -- text buttons String can be used instead of this object to specify text -- of the button. Optional fields are mutually exclusive. data KeyboardButton KeyboardButton :: Text -> Maybe Bool -> Maybe Bool -> KeyboardButton -- | Text of the button. If none of the optional fields are used, it will -- be sent as a message when the button is pressed [keyboardButtonText] :: KeyboardButton -> Text -- | If True, the user's phone number will be sent as a contact when the -- button is pressed. Available in private chats only [keyboardButtonRequestContact] :: KeyboardButton -> Maybe Bool -- | If True, the user's current location will be sent when the button is -- pressed. Available in private chats only [keyboardButtonRequestLocation] :: KeyboardButton -> Maybe Bool -- | Upon receiving a message with this object, Telegram clients will -- remove the current custom keyboard and display the default -- letter-keyboard. -- -- By default, custom keyboards are displayed until a new keyboard is -- sent by a bot. An exception is made for one-time keyboards that are -- hidden immediately after the user presses a button (see -- ReplyKeyboardMarkup). data ReplyKeyboardRemove ReplyKeyboardRemove :: Bool -> Maybe Bool -> ReplyKeyboardRemove -- | Requests clients to remove the custom keyboard (user will not be able -- to summon this keyboard; if you want to hide the keyboard from sight -- but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) [replyKeyboardRemoveRemoveKeyboard] :: ReplyKeyboardRemove -> Bool -- | Use this parameter if you want to remove the keyboard for specific -- users only. Targets: 1) users that are @mentioned in the text of the -- Message object; 2) if the bot's message is a reply (has -- reply_to_message_id), sender of the original message. [replyKeyboardRemoveSelective] :: ReplyKeyboardRemove -> Maybe Bool -- | This object represents an inline keyboard that appears right next to -- the message it belongs to. data InlineKeyboardMarkup InlineKeyboardMarkup :: [[InlineKeyboardButton]] -> InlineKeyboardMarkup -- | Array of button rows, each represented by an Array of -- InlineKeyboardButton objects [inlineKeyboardMarkupInlineKeyboard] :: InlineKeyboardMarkup -> [[InlineKeyboardButton]] -- | This object represents one button of an inline keyboard. You must use -- exactly one of the optional fields. data InlineKeyboardButton InlineKeyboardButton :: Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Bool -> InlineKeyboardButton -- | Label text on the button [inlineKeyboardButtonText] :: InlineKeyboardButton -> Text -- | HTTP url to be opened when button is pressed [inlineKeyboardButtonUrl] :: InlineKeyboardButton -> Maybe Text -- | Data to be sent in a callback query to the bot when button is pressed, -- 1-64 bytes [inlineKeyboardButtonCallbackData] :: InlineKeyboardButton -> Maybe Text -- | If set, pressing the button will prompt the user to select one of -- their chats, open that chat and insert the bot‘s username and the -- specified inline query in the input field. Can be empty, in which case -- just the bot’s username will be inserted. [inlineKeyboardButtonSwitchInlineQuery] :: InlineKeyboardButton -> Maybe Text -- | If set, pressing the button will insert the bot‘s username and the -- specified inline query in the current chat's input field. Can be -- empty, in which case only the bot’s username will be inserted. [inlineKeyboardButtonSwitchInlineQueryCurrentChat] :: InlineKeyboardButton -> Maybe Text -- | Specify True, to send a Pay button. [inlineKeyboardButtonPay] :: InlineKeyboardButton -> Maybe Bool labeledInlineKeyboardButton :: Text -> InlineKeyboardButton -- | This object represents an incoming callback query from a callback -- button in an inline keyboard. If the button that originated the query -- was attached to a message sent by the bot, the field message will be -- present. If the button was attached to a message sent via the bot (in -- inline mode), the field inline_message_id will be present. -- Exactly one of the fields data or game_short_name will be present. data CallbackQuery CallbackQuery :: CallbackQueryId -> User -> Maybe Message -> Maybe MessageId -> Text -> Maybe Text -> Maybe Text -> CallbackQuery -- | Unique identifier for this query [callbackQueryId] :: CallbackQuery -> CallbackQueryId -- | Sender [callbackQueryFrom] :: CallbackQuery -> User -- | Message with the callback button that originated the query. Note that -- message content and message date will not be available if the message -- is too old [callbackQueryMessage] :: CallbackQuery -> Maybe Message -- | Identifier of the message sent via the bot in inline mode, that -- originated the query. [callbackQueryInlineMessageId] :: CallbackQuery -> Maybe MessageId -- | Global identifier, uniquely corresponding to the chat to which the -- message with the callback button was sent. Useful for high scores in -- games. [callbackQueryChatInstance] :: CallbackQuery -> Text -- | Data associated with the callback button. Be aware that a bad client -- can send arbitrary data in this field. [callbackQueryData] :: CallbackQuery -> Maybe Text -- | Short name of a Game to be returned, serves as the unique identifier -- for the game [callbackQueryGameShortName] :: CallbackQuery -> Maybe Text newtype CallbackQueryId CallbackQueryId :: Text -> CallbackQueryId -- | Upon receiving a message with this object, Telegram clients will -- display a reply interface to the user (act as if the user has selected -- the bot‘s message and tapped ’Reply'). This can be extremely useful if -- you want to create user-friendly step-by-step interfaces without -- having to sacrifice privacy mode. data ForceReply ForceReply :: Bool -> Maybe Bool -> ForceReply -- | Shows reply interface to the user, as if they manually selected the -- bot‘s message and tapped ’Reply' [forceReplyForceReply] :: ForceReply -> Bool -- | Use this parameter if you want to force reply from specific users -- only. Targets: 1) users that are @mentioned in the text of the Message -- object; 2) if the bot's message is a reply (has reply_to_message_id), -- sender of the original message. [forceReplySelective] :: ForceReply -> Maybe Bool -- | Chat photo. Returned only in getChat. data ChatPhoto ChatPhoto :: FileId -> FileId -> ChatPhoto -- | Unique file identifier of small (160x160) chat photo. This file_id can -- be used only for photo download. [chatPhotoSmallFileId] :: ChatPhoto -> FileId -- | Unique file identifier of big (640x640) chat photo. This file_id can -- be used only for photo download. [chatPhotoBigFileId] :: ChatPhoto -> FileId -- | This object contains information about one member of a chat. data ChatMember ChatMember :: User -> Text -> Maybe POSIXTime -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> ChatMember -- | Information about the user [chatMemberUser] :: ChatMember -> User -- | The member's status in the chat. Can be “creator”, “administrator”, -- “member”, “restricted”, “left” or “kicked” [chatMemberStatus] :: ChatMember -> Text -- | Restictred and kicked only. Date when restrictions will be lifted for -- this user, unix time [chatMemberUntilDate] :: ChatMember -> Maybe POSIXTime -- | Administrators only. True, if the bot is allowed to edit administrator -- privileges of that user [chatMemberCanBeEdited] :: ChatMember -> Maybe Bool -- | Administrators only. True, if the administrator can change the chat -- title, photo and other settings [chatMemberCanChangeInfo] :: ChatMember -> Maybe Bool -- | Administrators only. True, if the administrator can post in the -- channel, channels only [chatMemberCanPostMessages] :: ChatMember -> Maybe Bool -- | Administrators only. True, if the administrator can edit messages of -- other users and can pin messages, channels only [chatMemberCanEditMessages] :: ChatMember -> Maybe Bool -- | Administrators only. True, if the administrator can delete messages of -- other users [chatMemberCanDeleteMessages] :: ChatMember -> Maybe Bool -- | Administrators only. True, if the administrator can invite new users -- to the chat [chatMemberCanInviteUsers] :: ChatMember -> Maybe Bool -- | Administrators only. True, if the administrator can restrict, ban or -- unban chat members [chatMemberCanRestrictMembers] :: ChatMember -> Maybe Bool -- | Administrators only. True, if the administrator can pin messages, -- supergroups only [chatMemberCanPinMessages] :: ChatMember -> Maybe Bool -- | Administrators only. True, if the administrator can add new -- administrators with a subset of his own privileges or demote -- administrators that he has promoted, directly or indirectly (promoted -- by administrators that were appointed by the user) [chatMemberCanPromoteMembers] :: ChatMember -> Maybe Bool -- | Restricted only. True, if the user can send text messages, contacts, -- locations and venues [chatMemberCanSendMessages] :: ChatMember -> Maybe Bool -- | Restricted only. True, if the user can send audios, documents, photos, -- videos, video notes and voice notes, implies can_send_messages [chatMemberCanSendMediaMessages] :: ChatMember -> Maybe Bool -- | Restricted only. True, if the user can send animations, games, -- stickers and use inline bots, implies can_send_media_messages [chatMemberCanSendOtherMessages] :: ChatMember -> Maybe Bool -- | Restricted only. True, if user may add web page previews to his -- messages, implies can_send_media_messages [chatMemberCanAddWebPagePreviews] :: ChatMember -> Maybe Bool -- | Contains information about why a request was unsuccessful. data ResponseParameters ResponseParameters :: Maybe ChatId -> Maybe Seconds -> ResponseParameters -- | The group has been migrated to a supergroup with the specified -- identifier. This number may be greater than 32 bits and some -- programming languages may have difficulty/silent defects in -- interpreting it. But it is smaller than 52 bits, so a signed 64 bit -- integer or double-precision float type are safe for storing this -- identifier. [responseParametersMigrateToChatId] :: ResponseParameters -> Maybe ChatId -- | In case of exceeding flood control, the number of seconds left to wait -- before the request can be repeated [responseParametersRetryAfter] :: ResponseParameters -> Maybe Seconds instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.ResponseParameters instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.ResponseParameters instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.ChatMember instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.ChatMember instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.ChatPhoto instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.ChatPhoto instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.ForceReply instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.ForceReply instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.CallbackQuery instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.CallbackQuery instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.InlineKeyboardButton instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.InlineKeyboardButton instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.InlineKeyboardMarkup instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.InlineKeyboardMarkup instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.ReplyKeyboardRemove instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.ReplyKeyboardRemove instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.KeyboardButton instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.KeyboardButton instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.ReplyKeyboardMarkup instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.ReplyKeyboardMarkup instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.File instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.File instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.UserProfilePhotos instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.UserProfilePhotos instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Venue instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Venue instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Location instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Location instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Contact instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Contact instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.VideoNote instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.VideoNote instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Voice instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Voice instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Video instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Video instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Document instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Document instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Audio instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Audio instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.PhotoSize instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.PhotoSize instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.MessageEntity instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.MessageEntity instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Message instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Message instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Chat instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Chat instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.User instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.User instance GHC.Generics.Generic Telegram.Bot.API.Types.ResponseParameters instance GHC.Show.Show Telegram.Bot.API.Types.ResponseParameters instance GHC.Show.Show Telegram.Bot.API.Types.ChatMember instance GHC.Generics.Generic Telegram.Bot.API.Types.ChatMember instance GHC.Show.Show Telegram.Bot.API.Types.CallbackQuery instance GHC.Generics.Generic Telegram.Bot.API.Types.CallbackQuery instance GHC.Show.Show Telegram.Bot.API.Types.Message instance GHC.Generics.Generic Telegram.Bot.API.Types.Message instance GHC.Show.Show Telegram.Bot.API.Types.Chat instance GHC.Generics.Generic Telegram.Bot.API.Types.Chat instance GHC.Show.Show Telegram.Bot.API.Types.ChatPhoto instance GHC.Generics.Generic Telegram.Bot.API.Types.ChatPhoto instance GHC.Show.Show Telegram.Bot.API.Types.ForceReply instance GHC.Generics.Generic Telegram.Bot.API.Types.ForceReply instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.CallbackQueryId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.CallbackQueryId instance GHC.Generics.Generic Telegram.Bot.API.Types.CallbackQueryId instance GHC.Show.Show Telegram.Bot.API.Types.CallbackQueryId instance GHC.Classes.Eq Telegram.Bot.API.Types.CallbackQueryId instance GHC.Show.Show Telegram.Bot.API.Types.InlineKeyboardMarkup instance GHC.Generics.Generic Telegram.Bot.API.Types.InlineKeyboardMarkup instance GHC.Show.Show Telegram.Bot.API.Types.InlineKeyboardButton instance GHC.Generics.Generic Telegram.Bot.API.Types.InlineKeyboardButton instance GHC.Show.Show Telegram.Bot.API.Types.ReplyKeyboardRemove instance GHC.Generics.Generic Telegram.Bot.API.Types.ReplyKeyboardRemove instance GHC.Show.Show Telegram.Bot.API.Types.ReplyKeyboardMarkup instance GHC.Generics.Generic Telegram.Bot.API.Types.ReplyKeyboardMarkup instance GHC.Show.Show Telegram.Bot.API.Types.KeyboardButton instance GHC.Generics.Generic Telegram.Bot.API.Types.KeyboardButton instance GHC.Show.Show Telegram.Bot.API.Types.File instance GHC.Generics.Generic Telegram.Bot.API.Types.File instance GHC.Show.Show Telegram.Bot.API.Types.UserProfilePhotos instance GHC.Generics.Generic Telegram.Bot.API.Types.UserProfilePhotos instance GHC.Show.Show Telegram.Bot.API.Types.Venue instance GHC.Generics.Generic Telegram.Bot.API.Types.Venue instance GHC.Show.Show Telegram.Bot.API.Types.Location instance GHC.Generics.Generic Telegram.Bot.API.Types.Location instance GHC.Show.Show Telegram.Bot.API.Types.Contact instance GHC.Generics.Generic Telegram.Bot.API.Types.Contact instance GHC.Show.Show Telegram.Bot.API.Types.VideoNote instance GHC.Generics.Generic Telegram.Bot.API.Types.VideoNote instance GHC.Show.Show Telegram.Bot.API.Types.Voice instance GHC.Generics.Generic Telegram.Bot.API.Types.Voice instance GHC.Show.Show Telegram.Bot.API.Types.Video instance GHC.Generics.Generic Telegram.Bot.API.Types.Video instance GHC.Show.Show Telegram.Bot.API.Types.Document instance GHC.Generics.Generic Telegram.Bot.API.Types.Document instance GHC.Show.Show Telegram.Bot.API.Types.Audio instance GHC.Generics.Generic Telegram.Bot.API.Types.Audio instance GHC.Show.Show Telegram.Bot.API.Types.PhotoSize instance GHC.Generics.Generic Telegram.Bot.API.Types.PhotoSize instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.FileId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.FileId instance GHC.Show.Show Telegram.Bot.API.Types.FileId instance GHC.Classes.Eq Telegram.Bot.API.Types.FileId instance GHC.Show.Show Telegram.Bot.API.Types.MessageEntity instance GHC.Generics.Generic Telegram.Bot.API.Types.MessageEntity instance GHC.Generics.Generic Telegram.Bot.API.Types.MessageEntityType instance GHC.Show.Show Telegram.Bot.API.Types.MessageEntityType instance GHC.Classes.Eq Telegram.Bot.API.Types.MessageEntityType instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.MediaGroupId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.MediaGroupId instance GHC.Show.Show Telegram.Bot.API.Types.MediaGroupId instance GHC.Classes.Eq Telegram.Bot.API.Types.MediaGroupId instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.MessageId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.MessageId instance GHC.Show.Show Telegram.Bot.API.Types.MessageId instance GHC.Classes.Eq Telegram.Bot.API.Types.MessageId instance GHC.Show.Show Telegram.Bot.API.Types.ChatType instance GHC.Generics.Generic Telegram.Bot.API.Types.ChatType instance Data.Hashable.Class.Hashable Telegram.Bot.API.Types.ChatId instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.ChatId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.ChatId instance GHC.Show.Show Telegram.Bot.API.Types.ChatId instance GHC.Classes.Eq Telegram.Bot.API.Types.ChatId instance GHC.Generics.Generic Telegram.Bot.API.Types.User instance GHC.Show.Show Telegram.Bot.API.Types.User instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.UserId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.UserId instance GHC.Show.Show Telegram.Bot.API.Types.UserId instance GHC.Classes.Eq Telegram.Bot.API.Types.UserId instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.Seconds instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.Seconds instance GHC.Num.Num Telegram.Bot.API.Types.Seconds instance GHC.Show.Show Telegram.Bot.API.Types.Seconds instance GHC.Classes.Eq Telegram.Bot.API.Types.Seconds instance Data.String.IsString Telegram.Bot.API.Types.KeyboardButton instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.MessageEntityType instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.MessageEntityType instance Web.Internal.HttpApiData.ToHttpApiData Telegram.Bot.API.Types.MessageId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Types.ChatType instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Types.ChatType instance Web.Internal.HttpApiData.ToHttpApiData Telegram.Bot.API.Types.ChatId instance Web.Internal.HttpApiData.ToHttpApiData Telegram.Bot.API.Types.UserId module Telegram.Bot.API.MakingRequests botBaseUrl :: Token -> BaseUrl defaultTelegramClientEnv :: Token -> IO ClientEnv defaultRunBot :: Token -> ClientM a -> IO (Either ClientError a) data Response a Response :: Bool -> Maybe Text -> a -> Maybe Integer -> Maybe ResponseParameters -> Response a [responseOk] :: Response a -> Bool [responseDescription] :: Response a -> Maybe Text [responseResult] :: Response a -> a [responseErrorCode] :: Response a -> Maybe Integer [responseParameters] :: Response a -> Maybe ResponseParameters newtype Token Token :: Text -> Token instance Data.String.IsString Telegram.Bot.API.MakingRequests.Token instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.MakingRequests.Token instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.MakingRequests.Token instance Web.Internal.HttpApiData.FromHttpApiData Telegram.Bot.API.MakingRequests.Token instance Web.Internal.HttpApiData.ToHttpApiData Telegram.Bot.API.MakingRequests.Token instance GHC.Show.Show Telegram.Bot.API.MakingRequests.Token instance GHC.Classes.Eq Telegram.Bot.API.MakingRequests.Token instance GHC.Generics.Generic (Telegram.Bot.API.MakingRequests.Response a) instance GHC.Show.Show a => GHC.Show.Show (Telegram.Bot.API.MakingRequests.Response a) instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Telegram.Bot.API.MakingRequests.Response a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Telegram.Bot.API.MakingRequests.Response a) module Telegram.Bot.API.Methods type GetMe = "getMe" :> Get '[JSON] (Response User) -- | 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. getMe :: ClientM (Response User) -- | Notice that deleting by POST method was bugged, so we use GET type DeleteMessage = "deleteMessage" :> RequiredQueryParam "chat_id" ChatId :> RequiredQueryParam "message_id" MessageId :> Get '[JSON] (Response Bool) -- | Use this method to delete message in chat. On success, the sent Bool -- is returned. deleteMessage :: ChatId -> MessageId -> ClientM (Response Bool) type SendMessage = "sendMessage" :> ReqBody '[JSON] SendMessageRequest :> Post '[JSON] (Response Message) -- | Use this method to send text messages. On success, the sent -- Message is returned. sendMessage :: SendMessageRequest -> ClientM (Response Message) type ForwardMessage = "forwardMessage" :> ReqBody '[JSON] ForwardMessageRequest :> Post '[JSON] (Response Message) -- | Use this method to forward messages of any kind. On success, the sent -- Message is returned. forwardMessage :: ForwardMessageRequest -> ClientM (Response Message) -- | Unique identifier for the target chat or username of the target -- channel (in the format @channelusername). data SomeChatId -- | Unique chat ID. SomeChatId :: ChatId -> SomeChatId -- | Username of the target channel. SomeChatUsername :: Text -> SomeChatId -- | 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. data SomeReplyMarkup SomeInlineKeyboardMarkup :: InlineKeyboardMarkup -> SomeReplyMarkup SomeReplyKeyboardMarkup :: ReplyKeyboardMarkup -> SomeReplyMarkup SomeReplyKeyboardRemove :: ReplyKeyboardRemove -> SomeReplyMarkup SomeForceReply :: ForceReply -> SomeReplyMarkup data ParseMode Markdown :: ParseMode HTML :: ParseMode MarkdownV2 :: ParseMode -- | Request parameters for sendMessage. data SendMessageRequest SendMessageRequest :: SomeChatId -> Text -> Maybe ParseMode -> Maybe Bool -> Maybe Bool -> Maybe MessageId -> Maybe SomeReplyMarkup -> SendMessageRequest -- | Unique identifier for the target chat or username of the target -- channel (in the format @channelusername). [sendMessageChatId] :: SendMessageRequest -> SomeChatId -- | Text of the message to be sent. [sendMessageText] :: SendMessageRequest -> Text -- | Send Markdown or HTML, if you want Telegram apps to show -- bold, italic, fixed-width text or inline URLs in your bot's message. [sendMessageParseMode] :: SendMessageRequest -> Maybe ParseMode -- | Disables link previews for links in this message. [sendMessageDisableWebPagePreview] :: SendMessageRequest -> Maybe Bool -- | Sends the message silently. Users will receive a notification with no -- sound. [sendMessageDisableNotification] :: SendMessageRequest -> Maybe Bool -- | If the message is a reply, ID of the original message. [sendMessageReplyToMessageId] :: SendMessageRequest -> Maybe MessageId -- | 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. [sendMessageReplyMarkup] :: SendMessageRequest -> Maybe SomeReplyMarkup -- | Request parameters for forwardMessage. data ForwardMessageRequest ForwardMessageRequest :: SomeChatId -> SomeChatId -> Maybe Bool -> MessageId -> ForwardMessageRequest -- | Unique identifier for the target chat or username of the target -- channel (in the format @@channelusername). [forwardMessageChatId] :: ForwardMessageRequest -> SomeChatId -- | Unique identifier for the chat where the original message was sent (or -- channel username in the format @@channelusername) [forwardMessageFromChatId] :: ForwardMessageRequest -> SomeChatId -- | Sends the message silently. Users will receive a notification with no -- sound. [forwardMessageDisableNotification] :: ForwardMessageRequest -> Maybe Bool -- | Message identifier in the chat specified in from_chat_id [forwardMessageMessageId] :: ForwardMessageRequest -> MessageId type SendDocumentContent = "sendDocument" :> MultipartForm Tmp SendDocumentRequest :> Post '[JSON] (Response Message) type SendDocumentLink = "sendDocument" :> ReqBody '[JSON] SendDocumentRequest :> Post '[JSON] (Response Message) -- | Use this method to send text messages. On success, the sent -- Message is returned. -- -- https://core.telegram.org/bots/api#senddocument sendDocument :: SendDocumentRequest -> ClientM (Response Message) -- | Request parameters for sendDocument data SendDocumentRequest SendDocumentRequest :: SomeChatId -> DocumentFile -> Maybe FilePath -> Maybe Text -> Maybe ParseMode -> Maybe Bool -> Maybe MessageId -> Maybe SomeReplyMarkup -> SendDocumentRequest -- | Unique identifier for the target chat or username of the target -- channel (in the format @channelusername). [sendDocumentChatId] :: SendDocumentRequest -> SomeChatId -- | Pass a file_id as String to send a file that exists on the Telegram -- servers (recommended), pass an HTTP URL as a String for Telegram to -- get a file from the Internet, or upload a new one using -- multipart/form-data [sendDocumentDocument] :: SendDocumentRequest -> DocumentFile -- | Thumbnail of the file sent; can be ignored if thumbnail generation for -- the file is supported server-side. The thumbnail should be in JPEG -- format and less than 200 kB in size. A thumbnail's width and height -- should not exceed 320. Ignored if the file is not uploaded using -- multipartform-data. Thumbnails can't be reused and can be only -- uploaded as a new file, so you can pass -- “attach:file_attach_name” if the thumbnail was uploaded -- using multipartform-data under file_attach_name [sendDocumentThumb] :: SendDocumentRequest -> Maybe FilePath -- | Document caption (may also be used when resending documents by -- file_id), 0-1024 characters after entities parsing [sendDocumentCaption] :: SendDocumentRequest -> Maybe Text -- | Mode for parsing entities in the document caption. [sendDocumentParseMode] :: SendDocumentRequest -> Maybe ParseMode -- | Sends the message silently. Users will receive a notification with no -- sound. [sendDocumentDisableNotification] :: SendDocumentRequest -> Maybe Bool [sendDocumentReplyToMessageId] :: SendDocumentRequest -> Maybe MessageId -- | 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. [sendDocumentReplyMarkup] :: SendDocumentRequest -> Maybe SomeReplyMarkup data DocumentFile DocumentFileId :: Int -> DocumentFile DocumentUrl :: Text -> DocumentFile DocumentFile :: FilePath -> ContentType -> DocumentFile type ContentType = Text -- | Generate send document structure. toSendDocument :: SomeChatId -> DocumentFile -> SendDocumentRequest instance GHC.Generics.Generic Telegram.Bot.API.Methods.SendDocumentRequest instance GHC.Generics.Generic Telegram.Bot.API.Methods.ForwardMessageRequest instance GHC.Generics.Generic Telegram.Bot.API.Methods.SendMessageRequest instance GHC.Generics.Generic Telegram.Bot.API.Methods.ParseMode instance GHC.Generics.Generic Telegram.Bot.API.Methods.SomeReplyMarkup instance GHC.Generics.Generic Telegram.Bot.API.Methods.SomeChatId instance Servant.Multipart.ToMultipart Servant.Multipart.Tmp Telegram.Bot.API.Methods.SendDocumentRequest instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Methods.SendDocumentRequest instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Methods.DocumentFile instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Methods.ForwardMessageRequest instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Methods.ForwardMessageRequest instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Methods.SendMessageRequest instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Methods.SendMessageRequest instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Methods.ParseMode instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Methods.ParseMode instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Methods.SomeReplyMarkup instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Methods.SomeReplyMarkup instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.Methods.SomeChatId instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.Methods.SomeChatId module Telegram.Bot.API.GettingUpdates newtype UpdateId UpdateId :: Int32 -> UpdateId -- | This object represents an incoming update. At most one of the -- optional parameters can be present in any given update. data Update Update :: UpdateId -> Maybe Message -> Maybe Message -> Maybe Message -> Maybe Message -> Maybe CallbackQuery -> Update -- | The update‘s unique identifier. Update identifiers start from a -- certain positive number and increase sequentially. This ID becomes -- especially handy if you’re using Webhooks, since it allows you to -- ignore repeated updates or to restore the correct update sequence, -- should they get out of order. If there are no new updates for at least -- a week, then identifier of the next update will be chosen randomly -- instead of sequentially. [updateUpdateId] :: Update -> UpdateId -- | New incoming message of any kind — text, photo, sticker, etc. [updateMessage] :: Update -> Maybe Message -- | New version of a message that is known to the bot and was edited [updateEditedMessage] :: Update -> Maybe Message -- | New incoming channel post of any kind — text, photo, sticker, etc. [updateChannelPost] :: Update -> Maybe Message -- | New version of a channel post that is known to the bot and was edited [updateEditedChannelPost] :: Update -> Maybe Message -- | New incoming callback query [updateCallbackQuery] :: Update -> Maybe CallbackQuery updateChatId :: Update -> Maybe ChatId extractUpdateMessage :: Update -> Maybe Message type GetUpdates = "getUpdates" :> ReqBody '[JSON] GetUpdatesRequest :> Get '[JSON] (Response [Update]) -- | Use this method to receive incoming updates using long polling. An -- list of Update objects is returned. -- -- NOTE: This method will not work if an outgoing webhook is set up. -- -- NOTE: In order to avoid getting duplicate updates, recalculate offset -- after each server response. getUpdates :: GetUpdatesRequest -> ClientM (Response [Update]) -- | Request parameters for getUpdates. data GetUpdatesRequest GetUpdatesRequest :: Maybe UpdateId -> Maybe Int32 -> Maybe Seconds -> Maybe [UpdateType] -> GetUpdatesRequest -- | Identifier of the first update to be returned. Must be greater by one -- than the highest among the identifiers of previously received updates. -- By default, updates starting with the earliest unconfirmed update are -- returned. An update is considered confirmed as soon as getUpdates is -- called with an offset higher than its update_id. The negative offset -- can be specified to retrieve updates starting from -offset update from -- the end of the updates queue. All previous updates will forgotten. [getUpdatesOffset] :: GetUpdatesRequest -> Maybe UpdateId -- | Limits the number of updates to be retrieved. Values between 1—100 are -- accepted. Defaults to 100. [getUpdatesLimit] :: GetUpdatesRequest -> Maybe Int32 -- | Timeout in seconds for long polling. Defaults to 0, i.e. usual short -- polling. Should be positive, short polling should be used for testing -- purposes only. [getUpdatesTimeout] :: GetUpdatesRequest -> Maybe Seconds -- | List the types of updates you want your bot to receive. For example, -- specify [“message”, “edited_channel_post”, “callback_query”] to only -- receive updates of these types. See GetUpdates for a complete list of -- available update types. Specify an empty list to receive all updates -- regardless of type (default). If not specified, the previous setting -- will be used. Please note that this parameter doesn't affect updates -- created before the call to the getUpdates, so unwanted updates may be -- received for a short period of time. [getUpdatesAllowedUpdates] :: GetUpdatesRequest -> Maybe [UpdateType] data UpdateType UpdateMessage :: UpdateType UpdateEditedMessage :: UpdateType UpdateChannelPost :: UpdateType UpdateEditedChannelPost :: UpdateType UpdateInlineQuery :: UpdateType UpdateChosenInlineResult :: UpdateType UpdateCallbackQuery :: UpdateType UpdateShippingQuery :: UpdateType UpdatePreCheckoutQuery :: UpdateType instance GHC.Generics.Generic Telegram.Bot.API.GettingUpdates.GetUpdatesRequest instance GHC.Generics.Generic Telegram.Bot.API.GettingUpdates.UpdateType instance GHC.Show.Show Telegram.Bot.API.GettingUpdates.Update instance GHC.Generics.Generic Telegram.Bot.API.GettingUpdates.Update instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.GettingUpdates.UpdateId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.GettingUpdates.UpdateId instance GHC.Show.Show Telegram.Bot.API.GettingUpdates.UpdateId instance GHC.Classes.Ord Telegram.Bot.API.GettingUpdates.UpdateId instance GHC.Classes.Eq Telegram.Bot.API.GettingUpdates.UpdateId instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.GettingUpdates.GetUpdatesRequest instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.GettingUpdates.GetUpdatesRequest instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.GettingUpdates.UpdateType instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.GettingUpdates.UpdateType instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.GettingUpdates.Update instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.GettingUpdates.Update module Telegram.Bot.API.Chat type KickChatMember = "kickChatMember" :> RequiredQueryParam "chat_id" ChatId :> RequiredQueryParam "user_id" UserId :> Get '[JSON] (Response Bool) -- | Use this method to kick user from chat. On success, the sent Bool is -- returned. kickChatMember :: ChatId -> UserId -> ClientM (Response Bool) module Telegram.Bot.API.UpdatingMessages type EditMessageText = "editMessageText" :> ReqBody '[JSON] EditMessageTextRequest :> Post '[JSON] (Response Message) -- | Use this method to send text messages. On success, the sent -- Message is returned. editMessageText :: EditMessageTextRequest -> ClientM (Response Message) -- | Request parameters for sendMessage. data EditMessageTextRequest EditMessageTextRequest :: Maybe SomeChatId -> Maybe MessageId -> Maybe MessageId -> Text -> Maybe ParseMode -> Maybe Bool -> Maybe SomeReplyMarkup -> EditMessageTextRequest -- | Required if editMessageTextInlineMessageId is not specified. -- Unique identifier for the target chat or username of the target -- channel (in the format @channelusername). [editMessageTextChatId] :: EditMessageTextRequest -> Maybe SomeChatId -- | Required if editMessageTextInlineMessageId is not specified. -- Identifier of the sent message. [editMessageTextMessageId] :: EditMessageTextRequest -> Maybe MessageId -- | Required if editMessageTextChatId and -- editMessageTextMessageId are not specified. Identifier of the -- sent message. [editMessageTextInlineMessageId] :: EditMessageTextRequest -> Maybe MessageId -- | Text of the message to be sent. [editMessageTextText] :: EditMessageTextRequest -> Text -- | Send Markdown or HTML, if you want Telegram apps to show -- bold, italic, fixed-width text or inline URLs in your bot's message. [editMessageTextParseMode] :: EditMessageTextRequest -> Maybe ParseMode -- | Disables link previews for links in this message. [editMessageTextDisableWebPagePreview] :: EditMessageTextRequest -> Maybe Bool -- | 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. [editMessageTextReplyMarkup] :: EditMessageTextRequest -> Maybe SomeReplyMarkup instance GHC.Generics.Generic Telegram.Bot.API.UpdatingMessages.EditMessageTextRequest instance Data.Aeson.Types.ToJSON.ToJSON Telegram.Bot.API.UpdatingMessages.EditMessageTextRequest instance Data.Aeson.Types.FromJSON.FromJSON Telegram.Bot.API.UpdatingMessages.EditMessageTextRequest module Telegram.Bot.API module Telegram.Bot.Simple.Eff -- | Bot handler context. -- -- The context may include an Update the bot is handling at the -- moment. newtype BotM a BotM :: ReaderT BotContext ClientM a -> BotM a [_runBotM] :: BotM a -> ReaderT BotContext ClientM a data BotContext BotContext :: User -> Maybe Update -> BotContext [botContextUser] :: BotContext -> User [botContextUpdate] :: BotContext -> Maybe Update liftClientM :: ClientM a -> BotM a runBotM :: BotContext -> BotM a -> ClientM a newtype Eff action model Eff :: Writer [BotM action] model -> Eff action model [_runEff] :: Eff action model -> Writer [BotM action] model runEff :: Eff action model -> (model, [BotM action]) eff :: BotM a -> Eff a () withEffect :: BotM action -> model -> Eff action model (<#) :: model -> BotM action -> Eff action model -- | Set a specific Update in a BotM context. setBotMUpdate :: Maybe Update -> BotM a -> BotM a -- | Set a specific Update in every effect of Eff context. setEffUpdate :: Maybe Update -> Eff action model -> Eff action model instance GHC.Base.Monad (Telegram.Bot.Simple.Eff.Eff action) instance GHC.Base.Applicative (Telegram.Bot.Simple.Eff.Eff action) instance GHC.Base.Functor (Telegram.Bot.Simple.Eff.Eff action) instance Control.Monad.IO.Class.MonadIO Telegram.Bot.Simple.Eff.BotM instance Control.Monad.Reader.Class.MonadReader Telegram.Bot.Simple.Eff.BotContext Telegram.Bot.Simple.Eff.BotM instance GHC.Base.Monad Telegram.Bot.Simple.Eff.BotM instance GHC.Base.Applicative Telegram.Bot.Simple.Eff.BotM instance GHC.Base.Functor Telegram.Bot.Simple.Eff.BotM instance Data.Bifunctor.Bifunctor Telegram.Bot.Simple.Eff.Eff module Telegram.Bot.Simple.BotApp.Internal -- | A bot application. data BotApp model action BotApp :: model -> (Update -> model -> Maybe action) -> (action -> model -> Eff action model) -> [BotJob model action] -> BotApp model action -- | Initial bot state. [botInitialModel] :: BotApp model action -> model -- | How to convert incoming Updates into actions. See -- Telegram.Bot.Simple.UpdateParser for some helpers. [botAction] :: BotApp model action -> Update -> model -> Maybe action -- | How to handle actions. [botHandler] :: BotApp model action -> action -> model -> Eff action model -- | Background bot jobs. [botJobs] :: BotApp model action -> [BotJob model action] -- | A background bot job. data BotJob model action BotJob :: Text -> (model -> Eff action model) -> BotJob model action -- | Cron schedule for the job. [botJobSchedule] :: BotJob model action -> Text -- | Job function. [botJobTask] :: BotJob model action -> model -> Eff action model -- | An environment actual bot runs in. data BotEnv model action BotEnv :: TVar model -> TQueue (Maybe Update, action) -> ClientEnv -> User -> BotEnv model action -- | A transactional variable with bot's current state. [botModelVar] :: BotEnv model action -> TVar model -- | A queue of actions to process (with associated -- Updates). [botActionsQueue] :: BotEnv model action -> TQueue (Maybe Update, action) -- | HTTP client environment (where and how exactly to make requests to -- Telegram Bot API). This includes Token. [botClientEnv] :: BotEnv model action -> ClientEnv -- | Information about the bot in the form of User. [botUser] :: BotEnv model action -> User -- | Run bot job task once. runJobTask :: BotEnv model action -> (model -> Eff action model) -> IO () -- | Schedule a cron-like bot job. scheduleBotJob :: BotEnv model action -> BotJob model action -> IO [ThreadId] -- | Schedule all bot jobs. scheduleBotJobs :: BotEnv model action -> [BotJob model action] -> IO [ThreadId] -- | Construct a default BotEnv model action for a bot. defaultBotEnv :: BotApp model action -> ClientEnv -> IO (BotEnv model action) -- | Issue a new action for the bot to process. issueAction :: BotEnv model action -> Maybe Update -> action -> IO () -- | Process one action. processAction :: BotApp model action -> BotEnv model action -> Maybe Update -> action -> ClientM () -- | A job to wait for the next action and process it. processActionJob :: BotApp model action -> BotEnv model action -> ClientM () -- | Process incoming actions indefinitely. processActionsIndefinitely :: BotApp model action -> BotEnv model action -> IO ThreadId -- | Start Update polling for a bot. startBotPolling :: BotApp model action -> BotEnv model action -> ClientM () -- | Start Update polling with a given update handler. startPolling :: (Update -> ClientM ()) -> ClientM () instance GHC.Base.Functor (Telegram.Bot.Simple.BotApp.Internal.BotJob model) module Telegram.Bot.Simple.BotApp -- | A bot application. data BotApp model action BotApp :: model -> (Update -> model -> Maybe action) -> (action -> model -> Eff action model) -> [BotJob model action] -> BotApp model action -- | Initial bot state. [botInitialModel] :: BotApp model action -> model -- | How to convert incoming Updates into actions. See -- Telegram.Bot.Simple.UpdateParser for some helpers. [botAction] :: BotApp model action -> Update -> model -> Maybe action -- | How to handle actions. [botHandler] :: BotApp model action -> action -> model -> Eff action model -- | Background bot jobs. [botJobs] :: BotApp model action -> [BotJob model action] -- | A background bot job. data BotJob model action BotJob :: Text -> (model -> Eff action model) -> BotJob model action -- | Cron schedule for the job. [botJobSchedule] :: BotJob model action -> Text -- | Job function. [botJobTask] :: BotJob model action -> model -> Eff action model -- | Start bot with update polling in the main thread. startBot :: BotApp model action -> ClientEnv -> IO (Either ClientError ()) -- | Like startBot, but ignores result. startBot_ :: BotApp model action -> ClientEnv -> IO () -- | 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 (action -> IO ()) -- | Like startBotAsync, but ignores result. startBotAsync_ :: BotApp model action -> ClientEnv -> IO () -- | Get a Token from environment variable. -- -- Common use: -- --
-- getEnvToken TELEGRAM_BOT_TOKEN --getEnvToken :: String -> IO Token module Telegram.Bot.Simple.Debug -- | This a default bot tracing modifier that relies on -- -- traceBotDefault :: (Show model, Show action) => BotApp model action -> BotApp model action -- | Trace (debug print) every Update before parsing it. traceTelegramUpdatesWith :: (Update -> String) -> BotApp model action -> BotApp model action -- | Trace (debug print) every update as pretty JSON value. traceTelegramUpdatesJSON :: BotApp model action -> BotApp model action -- | Trace (debug print) every update using Show instance. traceTelegramUpdatesShow :: BotApp model action -> BotApp model action -- | A type of an action to trace. data TracedAction action -- | An action that's about to be handled. TracedIncomingAction :: action -> TracedAction action -- | An action that's just been issued by some handler. TracedIssuedAction :: action -> TracedAction action -- | Pretty print TraceActionType. ppTracedAction :: Show action => TracedAction action -> String -- | Trace (debug print) every incoming and issued action. traceBotActionsWith :: (TracedAction action -> String) -> BotApp model action -> BotApp model action -- | Trace (debug print) bot actions using Show instance. traceBotActionsShow :: Show action => BotApp model action -> BotApp model action -- | Trace (debug print) bot model. traceBotModelWith :: (model -> String) -> BotApp model action -> BotApp model action -- | Trace (debug print) bot model using Show instance. traceBotModelShow :: Show model => BotApp model action -> BotApp model action -- | Trace (debug print) bot model using Show instance. traceBotModelJSON :: ToJSON model => BotApp model action -> BotApp model action -- | Pretty print a value as JSON. ppAsJSON :: ToJSON a => a -> String instance GHC.Show.Show action => GHC.Show.Show (Telegram.Bot.Simple.Debug.TracedAction action) instance GHC.Classes.Eq action => GHC.Classes.Eq (Telegram.Bot.Simple.Debug.TracedAction action) module Telegram.Bot.Simple.Conversation -- | Make bot to have a separate state for each conversation. -- -- Common use (to have a separate state for each chat): -- --
-- conversationBot updateChatId bot --conversationBot :: (Eq conversation, Hashable conversation) => (Update -> Maybe conversation) -> BotApp model action -> BotApp (HashMap (Maybe conversation) model) (Maybe conversation, action) -- | Pass latest Update to all bot jobs. -- -- This enables jobs to easily send notifications. useLatestUpdateInJobs :: BotApp model action -> BotApp (Maybe Update, model) (Maybe Update, action) module Telegram.Bot.Simple.InlineKeyboard urlButton :: Text -> Text -> InlineKeyboardButton callbackButton :: Text -> Text -> InlineKeyboardButton actionButton :: Show action => Text -> action -> InlineKeyboardButton module Telegram.Bot.Simple.Reply -- | Get current ChatId if possible. currentChatId :: BotM (Maybe ChatId) getEditMessageId :: BotM (Maybe EditMessageId) updateEditMessageId :: Update -> Maybe EditMessageId -- | Reply message parameters. This is just like SendMessageRequest -- but without SomeChatId specified. data ReplyMessage ReplyMessage :: Text -> Maybe ParseMode -> Maybe Bool -> Maybe Bool -> Maybe MessageId -> Maybe SomeReplyMarkup -> ReplyMessage -- | Text of the message to be sent. [replyMessageText] :: ReplyMessage -> Text -- | Send Markdown or HTML, if you want Telegram apps to show -- bold, italic, fixed-width text or inline URLs in your bot's message. [replyMessageParseMode] :: ReplyMessage -> Maybe ParseMode -- | Disables link previews for links in this message. [replyMessageDisableWebPagePreview] :: ReplyMessage -> Maybe Bool -- | Sends the message silently. Users will receive a notification with no -- sound. [replyMessageDisableNotification] :: ReplyMessage -> Maybe Bool -- | If the message is a reply, ID of the original message. [replyMessageReplyToMessageId] :: ReplyMessage -> Maybe MessageId -- | 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. [replyMessageReplyMarkup] :: ReplyMessage -> Maybe SomeReplyMarkup -- | Create a ReplyMessage with just some Text message. toReplyMessage :: Text -> ReplyMessage replyMessageToSendMessageRequest :: SomeChatId -> ReplyMessage -> SendMessageRequest -- | Reply in a chat with a given SomeChatId. replyTo :: SomeChatId -> ReplyMessage -> BotM () -- | Reply in the current chat (if possible). reply :: ReplyMessage -> BotM () -- | Reply with a text. replyText :: Text -> BotM () data EditMessage EditMessage :: Text -> Maybe ParseMode -> Maybe Bool -> Maybe SomeReplyMarkup -> EditMessage [editMessageText] :: EditMessage -> Text [editMessageParseMode] :: EditMessage -> Maybe ParseMode [editMessageDisableWebPagePreview] :: EditMessage -> Maybe Bool [editMessageReplyMarkup] :: EditMessage -> Maybe SomeReplyMarkup data EditMessageId EditChatMessageId :: SomeChatId -> MessageId -> EditMessageId EditInlineMessageId :: MessageId -> EditMessageId toEditMessage :: Text -> EditMessage editMessageToEditMessageTextRequest :: EditMessageId -> EditMessage -> EditMessageTextRequest editMessageToReplyMessage :: EditMessage -> ReplyMessage editMessage :: EditMessageId -> EditMessage -> BotM () editUpdateMessage :: EditMessage -> BotM () editUpdateMessageText :: Text -> BotM () replyOrEdit :: EditMessage -> BotM () instance GHC.Generics.Generic Telegram.Bot.Simple.Reply.ReplyMessage instance Data.String.IsString Telegram.Bot.Simple.Reply.EditMessage instance Data.String.IsString Telegram.Bot.Simple.Reply.ReplyMessage module Telegram.Bot.Simple module Telegram.Bot.Simple.UpdateParser newtype UpdateParser a UpdateParser :: (Update -> Maybe a) -> UpdateParser a [runUpdateParser] :: UpdateParser a -> Update -> Maybe a mkParser :: (Update -> Maybe a) -> UpdateParser a parseUpdate :: UpdateParser a -> Update -> Maybe a text :: UpdateParser Text plainText :: UpdateParser Text command :: Text -> UpdateParser Text callbackQueryDataRead :: Read a => UpdateParser a updateMessageText :: Update -> Maybe Text instance GHC.Base.Functor Telegram.Bot.Simple.UpdateParser.UpdateParser instance GHC.Base.Applicative Telegram.Bot.Simple.UpdateParser.UpdateParser instance GHC.Base.Alternative Telegram.Bot.Simple.UpdateParser.UpdateParser instance GHC.Base.Monad Telegram.Bot.Simple.UpdateParser.UpdateParser instance Control.Monad.Fail.MonadFail Telegram.Bot.Simple.UpdateParser.UpdateParser