-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Telegram Bot API bindings -- -- High-level bindings to the Telegram Bot API @package telegram-api @version 0.1.0.1 -- | This module contains data objects which represents requests to -- Telegram Bot API module Web.Telegram.API.Bot.Requests -- | This object represents request for sendMessage data SendMessageRequest SendMessageRequest :: Text -> Text -> Maybe ParseMode -> Maybe Bool -> Maybe Int -> SendMessageRequest [message_chat_id] :: SendMessageRequest -> Text [message_text] :: SendMessageRequest -> Text [message_parse_mode] :: SendMessageRequest -> Maybe ParseMode [message_disable_web_page_preview] :: SendMessageRequest -> Maybe Bool [message_reply_to_message_id] :: SendMessageRequest -> Maybe Int -- | This object represents request for forwardMessage data ForwardMessageRequest ForwardMessageRequest :: Text -> Text -> Int -> ForwardMessageRequest [forward_chat_id] :: ForwardMessageRequest -> Text [forward_from_chat_id] :: ForwardMessageRequest -> Text [forward_mesage_id] :: ForwardMessageRequest -> Int -- | This object represents request for sendPhoto data SendPhotoRequest SendPhotoRequest :: Text -> Text -> Maybe Text -> Maybe Int -> SendPhotoRequest [photo_chat_id] :: SendPhotoRequest -> Text [photo_photo] :: SendPhotoRequest -> Text [photo_caption] :: SendPhotoRequest -> Maybe Text [photo_reply_to_message_id] :: SendPhotoRequest -> Maybe Int -- | This object represents request for sendAudio data SendAudioRequest SendAudioRequest :: Text -> Text -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe Int -> SendAudioRequest [_audio_chat_id] :: SendAudioRequest -> Text [_audio_audio] :: SendAudioRequest -> Text [_audio_duration] :: SendAudioRequest -> Maybe Int [_audio_performer] :: SendAudioRequest -> Maybe Text [_audio_title] :: SendAudioRequest -> Maybe Text [_audio_reply_to_message_id] :: SendAudioRequest -> Maybe Int -- | This object represents request for sendDocument data SendDocumentRequest SendDocumentRequest :: Text -> Text -> Maybe Int -> SendDocumentRequest [document_chat_id] :: SendDocumentRequest -> Text [document_document] :: SendDocumentRequest -> Text [document_reply_to_message_id] :: SendDocumentRequest -> Maybe Int -- | This object represents request for sendSticker data SendStickerRequest SendStickerRequest :: Text -> Text -> Maybe Int -> SendStickerRequest [sticker_chat_id] :: SendStickerRequest -> Text [sticker_sticker] :: SendStickerRequest -> Text [sticker_reply_to_message_id] :: SendStickerRequest -> Maybe Int -- | This object represents request for sendVideo data SendVideoRequest SendVideoRequest :: Text -> Text -> Maybe Int -> Maybe Text -> Maybe Int -> SendVideoRequest [_video_chat_id] :: SendVideoRequest -> Text [_video_video] :: SendVideoRequest -> Text [_video_duration] :: SendVideoRequest -> Maybe Int [_video_caption] :: SendVideoRequest -> Maybe Text [_video_reply_to_message_id] :: SendVideoRequest -> Maybe Int -- | This object represents request for sendVoice data SendVoiceRequest SendVoiceRequest :: Text -> Text -> Maybe Int -> Maybe Int -> SendVoiceRequest [_voice_chat_id] :: SendVoiceRequest -> Text [_voice_voice] :: SendVoiceRequest -> Text [_voice_duration] :: SendVoiceRequest -> Maybe Int [_voice_reply_to_message_id] :: SendVoiceRequest -> Maybe Int -- | This object represents request for sendLocation data SendLocationRequest SendLocationRequest :: Text -> Float -> Float -> Maybe Int -> SendLocationRequest [location_chat_id] :: SendLocationRequest -> Text [location_latitude] :: SendLocationRequest -> Float [location_longitude] :: SendLocationRequest -> Float [location_reply_to_message_id] :: SendLocationRequest -> Maybe Int -- | This object represents request for sendChatAction data SendChatActionRequest SendChatActionRequest :: Text -> ChatAction -> SendChatActionRequest [action_chat_id] :: SendChatActionRequest -> Text [action_action] :: SendChatActionRequest -> ChatAction -- | Parse mode for text message data ParseMode Markdown :: ParseMode -- | Type of action to broadcast. data ChatAction Typing :: ChatAction UploadPhoto :: ChatAction RecordVideo :: ChatAction UploadVideo :: ChatAction RecordAudio :: ChatAction UploadAudio :: ChatAction UploadDocument :: ChatAction FindLocation :: ChatAction instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendChatActionRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendChatActionRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendChatActionRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendChatActionRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_7ChatAction instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_6ChatAction instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_5ChatAction instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_4ChatAction instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_3ChatAction instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_2ChatAction instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_1ChatAction instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0ChatAction instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1ChatAction instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_3SendLocationRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2SendLocationRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendLocationRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendLocationRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendLocationRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendLocationRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_3SendVoiceRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2SendVoiceRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendVoiceRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendVoiceRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendVoiceRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendVoiceRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_4SendVideoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_3SendVideoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2SendVideoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendVideoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendVideoRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendVideoRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendVideoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2SendDocumentRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendDocumentRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendDocumentRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendDocumentRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendDocumentRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2SendStickerRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendStickerRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendStickerRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendStickerRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendStickerRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_5SendAudioRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_4SendAudioRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_3SendAudioRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2SendAudioRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendAudioRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendAudioRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendAudioRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendAudioRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_3SendPhotoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2SendPhotoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendPhotoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendPhotoRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendPhotoRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendPhotoRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2ForwardMessageRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1ForwardMessageRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0ForwardMessageRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0ForwardMessageRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1ForwardMessageRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_4SendMessageRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_3SendMessageRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_2SendMessageRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_1SendMessageRequest instance GHC.Generics.Selector Web.Telegram.API.Bot.Requests.S1_0_0SendMessageRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0SendMessageRequest instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1SendMessageRequest instance GHC.Generics.Constructor Web.Telegram.API.Bot.Requests.C1_0ParseMode instance GHC.Generics.Datatype Web.Telegram.API.Bot.Requests.D1ParseMode instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendChatActionRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendChatActionRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.ChatAction instance GHC.Show.Show Web.Telegram.API.Bot.Requests.ChatAction instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendLocationRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendLocationRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendVoiceRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendVoiceRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendVideoRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendVideoRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendDocumentRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendDocumentRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendStickerRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendStickerRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendAudioRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendAudioRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendPhotoRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendPhotoRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.ForwardMessageRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.ForwardMessageRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.SendMessageRequest instance GHC.Show.Show Web.Telegram.API.Bot.Requests.SendMessageRequest instance GHC.Generics.Generic Web.Telegram.API.Bot.Requests.ParseMode instance GHC.Show.Show Web.Telegram.API.Bot.Requests.ParseMode instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.ParseMode instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.ParseMode instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendMessageRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendMessageRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.ForwardMessageRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.ForwardMessageRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendPhotoRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendPhotoRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendAudioRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendAudioRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendStickerRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendStickerRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendDocumentRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendDocumentRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendVideoRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendVideoRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendVoiceRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendVoiceRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendLocationRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendLocationRequest instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.ChatAction instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.ChatAction instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Requests.SendChatActionRequest instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Requests.SendChatActionRequest -- | This module contains objects which represent data of Telegram Bot API -- responses module Web.Telegram.API.Bot.Data -- | This object represents a Telegram user or bot. data User User :: Int -> Text -> Maybe Text -> Maybe Text -> User -- | Unique identifier for this user or bot [user_id] :: User -> Int -- | User‘s or bot’s first name [user_first_name] :: User -> Text -- | User‘s or bot’s last name [user_last_name] :: User -> Maybe Text -- | User‘s or bot’s username [user_username] :: User -> Maybe Text -- | This object represents a chat. data Chat Chat :: Int -> ChatType -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Chat -- | Unique identifier for this chat, not exceeding 1e13 by absolute value [chat_id] :: Chat -> Int -- | Type of chat, can be either Private, Group, -- Supergroup or Channel [chat_type] :: Chat -> ChatType -- | Title, for channels and group chats [chat_title] :: Chat -> Maybe Text -- | Username, for private chats and channels if available [chat_username] :: Chat -> Maybe Text -- | First name of the other party in a private chat [chat_first_name] :: Chat -> Maybe Text -- | Last name of the other party in a private chat [chat_last_name] :: Chat -> Maybe Text -- | This object represents a message. data Message Message :: Int -> User -> Int -> Chat -> Maybe User -> Maybe Int -> Maybe Message -> Maybe Text -> Maybe Audio -> Maybe Document -> Maybe [PhotoSize] -> Maybe Sticker -> Maybe Video -> Maybe Voice -> Maybe Text -> Maybe Contact -> Maybe Location -> Maybe User -> Maybe User -> Maybe Text -> Maybe [PhotoSize] -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Int -> Maybe Int -> Message -- | Unique message identifier [message_id] :: Message -> Int -- | Sender, can be empty for messages sent to channels [from] :: Message -> User -- | Date the message was sent in Unix time [date] :: Message -> Int -- | Conversation the message belongs to [chat] :: Message -> Chat -- | For forwarded messages, sender of the original message [forward_from] :: Message -> Maybe User -- | For forwarded messages, date the original message was sent in Unix -- time [forward_date] :: Message -> Maybe Int -- | 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. [reply_to_message] :: Message -> Maybe Message -- | For text messages, the actual UTF-8 text of the message [text] :: Message -> Maybe Text -- | Message is an audio file, information about the file [audio] :: Message -> Maybe Audio -- | Message is a general file, information about the file [document] :: Message -> Maybe Document -- | Message is a photo, available sizes of the photo [photo] :: Message -> Maybe [PhotoSize] -- | Message is a sticker, information about the sticker [sticker] :: Message -> Maybe Sticker -- | Message is a video, information about the video [video] :: Message -> Maybe Video -- | Message is a voice message, information about the file [voice] :: Message -> Maybe Voice -- | Caption for the photo or video [caption] :: Message -> Maybe Text -- | Message is a shared contact, information about the contact [contact] :: Message -> Maybe Contact -- | Message is a shared location, information about the location [location] :: Message -> Maybe Location -- | A new member was added to the group, information about them (this -- member may be the bot itself) [new_chat_participant] :: Message -> Maybe User -- | A member was removed from the group, information about them (this -- member may be the bot itself) [left_chat_participant] :: Message -> Maybe User -- | A chat title was changed to this value [new_chat_title] :: Message -> Maybe Text -- | A chat photo was change to this value [new_chat_photo] :: Message -> Maybe [PhotoSize] -- | Service message: the chat photo was deleted [delete_chat_photo] :: Message -> Maybe Bool -- | Service message: the group has been created [group_chat_created] :: Message -> Maybe Bool -- | Service message: the supergroup has been created [supergroup_chat_created] :: Message -> Maybe Bool -- | Service message: the channel has been created [channel_chat_created] :: Message -> Maybe Bool -- | The group has been migrated to a supergroup with the specified -- identifier, not exceeding 1e13 by absolute value [migrate_to_chat_id] :: Message -> Maybe Int -- | The supergroup has been migrated from a group with the specified -- identifier, not exceeding 1e13 by absolute value [migrate_from_chat_id] :: Message -> Maybe Int -- | This object represents one size of a photo or a File / -- Sticker thumbnail. data PhotoSize PhotoSize :: Text -> Int -> Int -> Maybe Int -> PhotoSize -- | Unique identifier for this file [photo_file_id] :: PhotoSize -> Text -- | Photo width [photo_width] :: PhotoSize -> Int -- | Photo height [photo_height] :: PhotoSize -> Int -- | File size [photo_file_size] :: PhotoSize -> Maybe Int -- | This object represents an audio file to be treated as music by the -- Telegram clients. data Audio Audio :: Text -> Int -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Int -> Audio -- | Unique identifier for this file [audio_file_id] :: Audio -> Text -- | Duration of the audio in seconds as defined by sender [audio_duration] :: Audio -> Int -- | Performer of the audio as defined by sender or by audio tags [audio_performer] :: Audio -> Maybe Text -- | Title of the audio as defined by sender or by audio tags [audio_title] :: Audio -> Maybe Text -- | MIME type of the file as defined by sender [audio_mime_type] :: Audio -> Maybe Text -- | File size [audio_file_size] :: Audio -> Maybe Int -- | This object represents a general file (as opposed to PhotoSize, -- Voice messages and Audio files). data Document Document :: Text -> Maybe PhotoSize -> Maybe Text -> Maybe Text -> Maybe Int -> Document -- | Unique file identifier [doc_file_id] :: Document -> Text -- | Document thumbnail as defined by sender [doc_thumb] :: Document -> Maybe PhotoSize -- | Original filename as defined by sender [doc_file_name] :: Document -> Maybe Text -- | MIME type of the file as defined by sender [doc_mime_type] :: Document -> Maybe Text -- | File size [doc_file_size] :: Document -> Maybe Int -- | This object represents a sticker. data Sticker Sticker :: Text -> Int -> Int -> Maybe PhotoSize -> Maybe Int -> Sticker -- | Unique identifier for this file [sticker_file_id] :: Sticker -> Text -- | Sticker width [sticker_width] :: Sticker -> Int -- | Sticker height [sticker_height] :: Sticker -> Int -- | Sticker thumbnail in .webp or .jpg format [sticker_thumb] :: Sticker -> Maybe PhotoSize -- | File size [sticker_file_size] :: Sticker -> Maybe Int -- | This object represents a video file. data Video Video :: Text -> Int -> Int -> Int -> Maybe PhotoSize -> Maybe Text -> Maybe Int -> Video -- | Unique identifier for this file [video_file_id] :: Video -> Text -- | Video width as defined by sender [video_width] :: Video -> Int -- | Video height as defined by sender [video_height] :: Video -> Int -- | Duration of the video in seconds as defined by sender [video_duration] :: Video -> Int -- | Video thumbnail [video_thumb] :: Video -> Maybe PhotoSize -- | MIME type of a file as defined by sender [video_mime_type] :: Video -> Maybe Text -- | File size [video_file_size] :: Video -> Maybe Int -- | This object represents a voice note. data Voice Voice :: Text -> Int -> Maybe Text -> Maybe Int -> Voice -- | Unique identifier for this file [voice_file_id] :: Voice -> Text -- | Duration of the audio in seconds as defined by sender [voice_duration] :: Voice -> Int -- | MIME type of the file as defined by sender [voice_mime_type] :: Voice -> Maybe Text -- | File size [voice_file_size] :: Voice -> Maybe Int -- | This object represents a phone contact. data Contact Contact :: Text -> Text -> Maybe Text -> Maybe Int -> Contact -- | Contact's phone number [contact_phone_number] :: Contact -> Text -- | Contact's first name [contact_first_name] :: Contact -> Text -- | Contact's last name [contact_last_name] :: Contact -> Maybe Text -- | Contact's user identifier in Telegram [contact_user_id] :: Contact -> Maybe Int -- | This object represents a point on the map. data Location Location :: Float -> Float -> Location -- | Longitude as defined by sender [longitude] :: Location -> Float -- | Latitude as defined by sender [latitude] :: Location -> Float -- | This object represents an incoming update. Only one of the optional -- parameters can be present in any given update. data Update Update :: Int -> Message -> 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 setWebhooks, since it allows -- you to ignore repeated updates or to restore the correct update -- sequence, should they get out of order. [update_id] :: Update -> Int -- | New incoming message of any kind — text, photo, sticker, etc. [message] :: Update -> Message -- | 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. -- -- Maximum file size to download is 20 MB data File File :: Text -> Maybe Int -> Maybe Text -> File -- | Unique identifier for this file [file_id] :: File -> Text -- | File size, if known [file_size] :: File -> Maybe Int -- | File path. Use -- https://api.telegram.org/file/bot<token>/<file_path> -- to get the file. [file_path] :: File -> Maybe Text -- | This object represent a user's profile pictures. data UserProfilePhotos UserProfilePhotos :: Int -> [[PhotoSize]] -> UserProfilePhotos -- | Total number of profile pictures the target user has [total_count] :: UserProfilePhotos -> Int -- | Requested profile pictures (in up to 4 sizes each) [photos] :: UserProfilePhotos -> [[PhotoSize]] -- | Type of chat. data ChatType Private :: ChatType Group :: ChatType Supergroup :: ChatType Channel :: ChatType instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Update instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Update instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Update instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Update instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_26Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_25Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_24Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_23Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_22Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_21Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_20Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_19Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_18Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_17Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_16Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_15Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_14Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_13Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_12Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_11Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_10Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_9Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_8Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_7Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_6Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_5Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_4Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Message instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Message instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Message instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1UserProfilePhotos instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0UserProfilePhotos instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0UserProfilePhotos instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1UserProfilePhotos instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2File instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1File instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0File instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0File instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1File instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Location instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Location instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Location instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Location instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3Voice instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2Voice instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Voice instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Voice instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Voice instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Voice instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_6Video instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_5Video instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_4Video instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3Video instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2Video instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Video instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Video instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Video instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Video instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_4Sticker instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3Sticker instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2Sticker instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Sticker instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Sticker instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Sticker instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Sticker instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_4Document instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3Document instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2Document instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Document instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Document instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Document instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Document instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_5Audio instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_4Audio instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3Audio instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2Audio instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Audio instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Audio instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Audio instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Audio instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3PhotoSize instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2PhotoSize instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1PhotoSize instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0PhotoSize instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0PhotoSize instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1PhotoSize instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_5Chat instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_4Chat instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3Chat instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2Chat instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Chat instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Chat instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Chat instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Chat instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_3ChatType instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_2ChatType instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_1ChatType instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0ChatType instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1ChatType instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3Contact instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2Contact instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1Contact instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0Contact instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0Contact instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1Contact instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_3User instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_2User instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_1User instance GHC.Generics.Selector Web.Telegram.API.Bot.Data.S1_0_0User instance GHC.Generics.Constructor Web.Telegram.API.Bot.Data.C1_0User instance GHC.Generics.Datatype Web.Telegram.API.Bot.Data.D1User instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Update instance GHC.Show.Show Web.Telegram.API.Bot.Data.Update instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Update instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Update instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Message instance GHC.Show.Show Web.Telegram.API.Bot.Data.Message instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Message instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Message instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.UserProfilePhotos instance GHC.Show.Show Web.Telegram.API.Bot.Data.UserProfilePhotos instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.UserProfilePhotos instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.UserProfilePhotos instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.File instance GHC.Show.Show Web.Telegram.API.Bot.Data.File instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.File instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.File instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Location instance GHC.Show.Show Web.Telegram.API.Bot.Data.Location instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Location instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Location instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Voice instance GHC.Show.Show Web.Telegram.API.Bot.Data.Voice instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Video instance GHC.Show.Show Web.Telegram.API.Bot.Data.Video instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Sticker instance GHC.Show.Show Web.Telegram.API.Bot.Data.Sticker instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Document instance GHC.Show.Show Web.Telegram.API.Bot.Data.Document instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Audio instance GHC.Show.Show Web.Telegram.API.Bot.Data.Audio instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.PhotoSize instance GHC.Show.Show Web.Telegram.API.Bot.Data.PhotoSize instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Chat instance GHC.Show.Show Web.Telegram.API.Bot.Data.Chat instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.ChatType instance GHC.Show.Show Web.Telegram.API.Bot.Data.ChatType instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.Contact instance GHC.Show.Show Web.Telegram.API.Bot.Data.Contact instance GHC.Generics.Generic Web.Telegram.API.Bot.Data.User instance GHC.Show.Show Web.Telegram.API.Bot.Data.User instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.User instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.User instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Contact instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Contact instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Chat instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Chat instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.ChatType instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.ChatType instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.PhotoSize instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.PhotoSize instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Audio instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Audio instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Document instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Document instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Sticker instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Sticker instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Video instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Video instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Data.Voice instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Data.Voice -- | This module contains responses from Telegram Bot API module Web.Telegram.API.Bot.Responses -- | This object represents getMe response data GetMeResponse GetMeResponse :: User -> GetMeResponse [user_result] :: GetMeResponse -> User -- | This object represents message response data MessageResponse MessageResponse :: Message -> MessageResponse [message_result] :: MessageResponse -> Message -- | This object represents sendChatAction response data ChatActionResponse ChatActionResponse :: Bool -> ChatActionResponse [action_result] :: ChatActionResponse -> Bool -- | This object represents getUpdates response data UpdatesResponse UpdatesResponse :: [Update] -> UpdatesResponse [update_result] :: UpdatesResponse -> [Update] -- | This object represents file response data FileResponse FileResponse :: File -> FileResponse [file_result] :: FileResponse -> File -- | This object represents user profile photos response data UserProfilePhotosResponse UserProfilePhotosResponse :: UserProfilePhotos -> UserProfilePhotosResponse [photos_result] :: UserProfilePhotosResponse -> UserProfilePhotos -- | This object represents setWebhook response data SetWebhookResponse SetWebhookResponse :: Bool -> SetWebhookResponse [webhook_result] :: SetWebhookResponse -> Bool instance GHC.Generics.Selector Web.Telegram.API.Bot.Responses.S1_0_0SetWebhookResponse instance GHC.Generics.Constructor Web.Telegram.API.Bot.Responses.C1_0SetWebhookResponse instance GHC.Generics.Datatype Web.Telegram.API.Bot.Responses.D1SetWebhookResponse instance GHC.Generics.Selector Web.Telegram.API.Bot.Responses.S1_0_0UserProfilePhotosResponse instance GHC.Generics.Constructor Web.Telegram.API.Bot.Responses.C1_0UserProfilePhotosResponse instance GHC.Generics.Datatype Web.Telegram.API.Bot.Responses.D1UserProfilePhotosResponse instance GHC.Generics.Selector Web.Telegram.API.Bot.Responses.S1_0_0FileResponse instance GHC.Generics.Constructor Web.Telegram.API.Bot.Responses.C1_0FileResponse instance GHC.Generics.Datatype Web.Telegram.API.Bot.Responses.D1FileResponse instance GHC.Generics.Selector Web.Telegram.API.Bot.Responses.S1_0_0UpdatesResponse instance GHC.Generics.Constructor Web.Telegram.API.Bot.Responses.C1_0UpdatesResponse instance GHC.Generics.Datatype Web.Telegram.API.Bot.Responses.D1UpdatesResponse instance GHC.Generics.Selector Web.Telegram.API.Bot.Responses.S1_0_0ChatActionResponse instance GHC.Generics.Constructor Web.Telegram.API.Bot.Responses.C1_0ChatActionResponse instance GHC.Generics.Datatype Web.Telegram.API.Bot.Responses.D1ChatActionResponse instance GHC.Generics.Selector Web.Telegram.API.Bot.Responses.S1_0_0MessageResponse instance GHC.Generics.Constructor Web.Telegram.API.Bot.Responses.C1_0MessageResponse instance GHC.Generics.Datatype Web.Telegram.API.Bot.Responses.D1MessageResponse instance GHC.Generics.Selector Web.Telegram.API.Bot.Responses.S1_0_0GetMeResponse instance GHC.Generics.Constructor Web.Telegram.API.Bot.Responses.C1_0GetMeResponse instance GHC.Generics.Datatype Web.Telegram.API.Bot.Responses.D1GetMeResponse instance GHC.Generics.Generic Web.Telegram.API.Bot.Responses.SetWebhookResponse instance GHC.Show.Show Web.Telegram.API.Bot.Responses.SetWebhookResponse instance GHC.Generics.Generic Web.Telegram.API.Bot.Responses.UserProfilePhotosResponse instance GHC.Show.Show Web.Telegram.API.Bot.Responses.UserProfilePhotosResponse instance GHC.Generics.Generic Web.Telegram.API.Bot.Responses.FileResponse instance GHC.Show.Show Web.Telegram.API.Bot.Responses.FileResponse instance GHC.Generics.Generic Web.Telegram.API.Bot.Responses.UpdatesResponse instance GHC.Show.Show Web.Telegram.API.Bot.Responses.UpdatesResponse instance GHC.Generics.Generic Web.Telegram.API.Bot.Responses.ChatActionResponse instance GHC.Show.Show Web.Telegram.API.Bot.Responses.ChatActionResponse instance GHC.Generics.Generic Web.Telegram.API.Bot.Responses.MessageResponse instance GHC.Show.Show Web.Telegram.API.Bot.Responses.MessageResponse instance GHC.Generics.Generic Web.Telegram.API.Bot.Responses.GetMeResponse instance GHC.Show.Show Web.Telegram.API.Bot.Responses.GetMeResponse instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Responses.GetMeResponse instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Responses.GetMeResponse instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Responses.MessageResponse instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Responses.MessageResponse instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Responses.ChatActionResponse instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Responses.ChatActionResponse instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Responses.UpdatesResponse instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Responses.UpdatesResponse instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Responses.FileResponse instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Responses.FileResponse instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Responses.UserProfilePhotosResponse instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Responses.UserProfilePhotosResponse instance Data.Aeson.Types.Class.ToJSON Web.Telegram.API.Bot.Responses.SetWebhookResponse instance Data.Aeson.Types.Class.FromJSON Web.Telegram.API.Bot.Responses.SetWebhookResponse module Web.Telegram.API.Bot.API -- | 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 :: Token -> IO (Either ServantError GetMeResponse) -- | Use this method to send text messages. On success, the sent -- Message is returned. sendMessage :: Token -> SendMessageRequest -> IO (Either ServantError MessageResponse) -- | Use this method to forward messages of any kind. On success, the sent -- Message is returned. forwardMessage :: Token -> ForwardMessageRequest -> IO (Either ServantError MessageResponse) -- | Use this method to send photos. On success, the sent Message is -- returned. sendPhoto :: Token -> SendPhotoRequest -> IO (Either ServantError MessageResponse) -- | Use this method to send audio files, if you want Telegram clients to -- display them in the music player. Your audio must be in the .mp3 -- format. On success, the sent Message is returned. Bots can -- currently send audio files of up to 50 MB in size, this limit may be -- changed in the future. -- -- For backward compatibility, when the fields title and -- performer are both empty and the mime-type of the file to be -- sent is not _audio/mpeg_, the file will be sent as a playable voice -- message. For this to work, the audio must be in an .ogg file encoded -- with OPUS. This behavior will be phased out in the future. For sending -- voice messages, use the sendVoice method instead. sendAudio :: Token -> SendAudioRequest -> IO (Either ServantError MessageResponse) -- | Use this method to send general files. On success, the sent -- Message is returned. Bots can currently send files of any type -- of up to 50 MB in size, this limit may be changed in the future. sendDocument :: Token -> SendDocumentRequest -> IO (Either ServantError MessageResponse) -- | Use this method to send .webp stickers. On success, the sent -- Message is returned. sendSticker :: Token -> SendStickerRequest -> IO (Either ServantError MessageResponse) -- | Use this method to send video files, Telegram clients support mp4 -- videos (other formats may be sent as Document). On success, the -- sent Message is returned. Bots can currently send video files -- of up to 50 MB in size, this limit may be changed in the future. sendVideo :: Token -> SendVideoRequest -> IO (Either ServantError MessageResponse) -- | Use this method to send audio files, if you want Telegram clients to -- display the file as a playable voice message. For this to work, your -- audio must be in an .ogg file encoded with OPUS (other formats may be -- sent as Audio or Document). On success, the sent -- Message is returned. Bots can currently send voice messages of -- up to 50 MB in size, this limit may be changed in the future. sendVoice :: Token -> SendVoiceRequest -> IO (Either ServantError MessageResponse) -- | Use this method to send point on the map. On success, the sent -- Message is returned. sendLocation :: Token -> SendLocationRequest -> IO (Either ServantError MessageResponse) -- | Use this method when you need to tell the user that something is -- happening on the bot's side. The status is set for 5 seconds or less -- (when a message arrives from your bot, Telegram clients clear its -- typing status). sendChatAction :: Token -> SendChatActionRequest -> IO (Either ServantError ChatActionResponse) -- | Use this method to receive incoming updates using long polling. An -- Array of Update objects is returned. getUpdates :: Token -> Maybe Int -> Maybe Int -> Maybe Int -> IO (Either ServantError UpdatesResponse) getFile :: Token -> Text -> IO (Either ServantError FileResponse) -- | Use this method to get a list of profile pictures for a user. Returns -- a UserProfilePhotos object. getUserProfilePhotos :: Token -> Int -> Maybe Int -> Maybe Int -> IO (Either ServantError UserProfilePhotosResponse) -- | Use this method to specify a url and receive incoming updates via an -- outgoing webhook. Whenever there is an update for the bot, we will -- send an HTTPS POST request to the specified url, containing a -- JSON-serialized Update. In case of an unsuccessful request, we -- will give up after a reasonable amount of attempts. -- -- If you'd like to make sure that the Webhook request comes from -- Telegram, we recommend using a secret path in the URL, e.g. -- https://www.example.com/<token>. Since nobody -- else knows your bot‘s token, you can be pretty sure it’s us. setWebhook :: Token -> Maybe Text -> IO (Either ServantError SetWebhookResponse) -- | Telegram Bot API type TelegramBotAPI = (TelegramToken :> ("getMe" :> Get '[JSON] GetMeResponse)) :<|> ((TelegramToken :> ("sendMessage" :> (ReqBody '[JSON] SendMessageRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("forwardMessage" :> (ReqBody '[JSON] ForwardMessageRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("sendPhoto" :> (ReqBody '[JSON] SendPhotoRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("sendAudio" :> (ReqBody '[JSON] SendAudioRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("sendDocument" :> (ReqBody '[JSON] SendDocumentRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("sendSticker" :> (ReqBody '[JSON] SendStickerRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("sendVideo" :> (ReqBody '[JSON] SendVideoRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("sendVoice" :> (ReqBody '[JSON] SendVoiceRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("sendLocation" :> (ReqBody '[JSON] SendLocationRequest :> Post '[JSON] MessageResponse))) :<|> ((TelegramToken :> ("sendChatAction" :> (ReqBody '[JSON] SendChatActionRequest :> Post '[JSON] ChatActionResponse))) :<|> ((TelegramToken :> ("getUpdates" :> (QueryParam "offset" Int :> (QueryParam "limit" Int :> (QueryParam "timeout" Int :> Get '[JSON] UpdatesResponse))))) :<|> ((TelegramToken :> ("getFile" :> (QueryParam "file_id" Text :> Get '[JSON] FileResponse))) :<|> ((TelegramToken :> ("getUserProfilePhotos" :> (QueryParam "user_id" Int :> (QueryParam "offset" Int :> (QueryParam "limit" Int :> Get '[JSON] UserProfilePhotosResponse))))) :<|> (TelegramToken :> ("setWebhook" :> (QueryParam "url" Text :> Get '[JSON] SetWebhookResponse)))))))))))))))) -- | Proxy for Thelegram Bot API api :: Proxy TelegramBotAPI -- | Telegram Bot's Token newtype Token Token :: Text -> Token instance GHC.Classes.Ord Web.Telegram.API.Bot.API.Token instance GHC.Classes.Eq Web.Telegram.API.Bot.API.Token instance GHC.Show.Show Web.Telegram.API.Bot.API.Token instance Servant.Common.Text.ToText Web.Telegram.API.Bot.API.Token instance Servant.Common.Text.FromText Web.Telegram.API.Bot.API.Token -- | This module provides Telegram Bot API module Web.Telegram.API.Bot