Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains objects which represent data of Telegram Bot API responses
- data User = User {}
- data Chat = Chat {}
- data Message = Message {
- message_id :: Int
- from :: Maybe User
- date :: Int
- chat :: Chat
- forward_from :: Maybe User
- forward_from_chat :: Maybe Chat
- forward_date :: Maybe Int
- reply_to_message :: Maybe Message
- text :: Maybe Text
- entities :: Maybe [MessageEntity]
- audio :: Maybe Audio
- document :: Maybe Document
- photo :: Maybe [PhotoSize]
- sticker :: Maybe Sticker
- video :: Maybe Video
- voice :: Maybe Voice
- caption :: Maybe Text
- contact :: Maybe Contact
- location :: Maybe Location
- venue :: Maybe Venue
- new_chat_member :: Maybe User
- left_chat_member :: Maybe User
- new_chat_title :: Maybe Text
- new_chat_photo :: Maybe [PhotoSize]
- delete_chat_photo :: Maybe Bool
- group_chat_created :: Maybe Bool
- supergroup_chat_created :: Maybe Bool
- channel_chat_created :: Maybe Bool
- migrate_to_chat_id :: Maybe Int
- migrate_from_chat_id :: Maybe Int
- pinned_message :: Maybe Message
- data PhotoSize = PhotoSize {}
- data Audio = Audio {}
- data Document = Document {}
- data Sticker = Sticker {}
- data Video = Video {}
- data Voice = Voice {}
- data Contact = Contact {}
- data Location = Location {}
- data Update = Update {}
- data File = File {}
- data UserProfilePhotos = UserProfilePhotos {
- total_count :: Int
- photos :: [[PhotoSize]]
- data InlineQuery = InlineQuery {
- query_id :: Text
- query_from :: User
- query_location :: Maybe Location
- query_query :: Text
- query_offset :: Text
- data ChosenInlineResult = ChosenInlineResult {}
- data InlineQueryResult
- = InlineQueryResultArticle {
- iq_res_id :: Text
- iq_res_title :: Maybe Text
- iq_res_input_message_content :: Maybe InputMessageContent
- iq_res_reply_markup :: Maybe InlineKeyboardMarkup
- iq_res_url :: Maybe Text
- iq_res_hide_url :: Maybe Bool
- iq_res_description :: Maybe Text
- iq_res_thumb_url :: Maybe Text
- iq_res_thumb_width :: Maybe Int
- iq_res_thumb_height :: Maybe Int
- | InlineQueryResultPhoto {
- iq_res_id :: Text
- iq_res_photo_url :: Text
- iq_res_thumb_url :: Maybe Text
- iq_res_photo_width :: Maybe Int
- iq_res_photo_height :: Maybe Int
- iq_res_title :: Maybe Text
- iq_res_description :: Maybe Text
- iq_res_caption :: Maybe Text
- iq_res_reply_markup :: Maybe InlineKeyboardMarkup
- iq_res_input_message_content :: Maybe InputMessageContent
- | InlineQueryResultGif { }
- | InlineQueryResultMpeg4Gif { }
- | InlineQueryResultVideo {
- iq_res_id :: Text
- iq_res_video_url :: Text
- iq_res_mime_type :: Text
- iq_res_thumb_url :: Maybe Text
- iq_res_title :: Maybe Text
- iq_res_caption :: Maybe Text
- iq_res_video_width :: Maybe Int
- iq_res_video_height :: Maybe Int
- iq_res_video_duration :: Maybe Int
- iq_res_description :: Maybe Text
- iq_res_reply_markup :: Maybe InlineKeyboardMarkup
- iq_res_input_message_content :: Maybe InputMessageContent
- | InlineQueryResultAudio { }
- | InlineQueryResultVoice { }
- | InlineQueryResultDocument {
- iq_res_id :: Text
- iq_res_title :: Maybe Text
- iq_res_caption :: Maybe Text
- iq_res_document_url :: Text
- iq_res_mime_type :: Text
- iq_res_description :: Maybe Text
- iq_res_reply_markup :: Maybe InlineKeyboardMarkup
- iq_res_input_message_content :: Maybe InputMessageContent
- iq_res_thumb_url :: Maybe Text
- iq_res_thumb_width :: Maybe Int
- iq_res_thumb_height :: Maybe Int
- | InlineQueryResultLocation { }
- | InlineQueryResultVenue {
- iq_res_id :: Text
- iq_res_latitude :: Float
- iq_res_longitude :: Float
- iq_res_title :: Maybe Text
- iq_res_address :: Text
- iq_res_foursquare_id :: Maybe Text
- iq_res_reply_markup :: Maybe InlineKeyboardMarkup
- iq_res_input_message_content :: Maybe InputMessageContent
- iq_res_thumb_url :: Maybe Text
- iq_res_thumb_width :: Maybe Int
- iq_res_thumb_height :: Maybe Int
- | InlineQueryResultContact { }
- | InlineQueryResultCachedPhoto { }
- | InlineQueryResultCachedGif { }
- | InlineQueryResultCachedMpeg4Gif { }
- | InlineQueryResultCachedSticker { }
- | InlineQueryResultCachedDocument { }
- | InlineQueryResultCachedVideo { }
- | InlineQueryResultCachedVoice { }
- | InlineQueryResultCachedAudio { }
- = InlineQueryResultArticle {
- data InlineKeyboardMarkup = InlineKeyboardMarkup {}
- data InlineKeyboardButton = InlineKeyboardButton {}
- data CallbackQuery = CallbackQuery {}
- data ChatType
- = Private
- | Group
- | Supergroup
- | Channel
- data ParseMode
- data InputMessageContent
- data KeyboardButton = KeyboardButton {}
- inlineKeyboardButton :: Text -> InlineKeyboardButton
- keyboardButton :: Text -> KeyboardButton
- inlineQueryResultArticle :: Text -> Text -> InputMessageContent -> InlineQueryResult
- inlineQueryResultAudio :: Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultContact :: Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultDocument :: Text -> Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultGif :: Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultLocation :: Text -> Float -> Float -> Text -> InlineQueryResult
- inlineQueryResultMpeg4Gif :: Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultPhoto :: Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultVenue :: Text -> Float -> Float -> Text -> Text -> InlineQueryResult
- inlineQueryResultVideo :: Text -> Text -> Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultVoice :: Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultCachedAudio :: Text -> Text -> InlineQueryResult
- inlineQueryResultCachedDocument :: Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultCachedGif :: Text -> Text -> InlineQueryResult
- inlineQueryResultCachedMpeg4Gif :: Text -> Text -> InlineQueryResult
- inlineQueryResultCachedPhoto :: Text -> Text -> InlineQueryResult
- inlineQueryResultCachedSticker :: Text -> Text -> InlineQueryResult
- inlineQueryResultCachedVideo :: Text -> Text -> Text -> InlineQueryResult
- inlineQueryResultCachedVoice :: Text -> Text -> Text -> InlineQueryResult
Types
This object represents a Telegram user or bot.
User | |
|
This object represents a chat.
Chat | |
|
This object represents a message.
Message | |
|
PhotoSize | |
|
This object represents an audio file to be treated as music by the Telegram clients.
Audio | |
|
Document | |
|
This object represents a sticker.
Sticker | |
|
This object represents a video file.
Video | |
|
This object represents a voice note.
Voice | |
|
This object represents a phone contact.
Contact | |
|
This object represents a point on the map.
This object represents an incoming update. Only one of the optional parameters can be present in any given update.
Update | |
|
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 UserProfilePhotos Source
This object represent a user's profile pictures.
UserProfilePhotos | |
|
data InlineQuery Source
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
InlineQuery | |
|
data ChosenInlineResult Source
This object represents a result of an inline query that was chosen by the user and sent to their chat partner.
ChosenInlineResult | |
|
data InlineQueryResult Source
InlineQueryResultArticle | Represents a link to an article or web page. |
| |
InlineQueryResultPhoto | Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo. |
| |
InlineQueryResultGif | Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can provide message_text to send it instead of the animation. |
| |
InlineQueryResultMpeg4Gif | Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can provide message_text to send it instead of the animation. |
| |
InlineQueryResultVideo | Represents link to a page containing an embedded video player or a video file. |
| |
InlineQueryResultAudio | Represents a link to an mp3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio. |
| |
InlineQueryResultVoice | Represents a link to a voice recording in an .ogg container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message. |
| |
InlineQueryResultDocument | Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method. |
| |
InlineQueryResultLocation | Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location. |
| |
InlineQueryResultVenue | Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue. |
| |
InlineQueryResultContact | Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo. |
| |
InlineQueryResultCachedPhoto | Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo. |
| |
InlineQueryResultCachedGif | Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation. |
| |
InlineQueryResultCachedMpeg4Gif | Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation. |
| |
InlineQueryResultCachedSticker | Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker. |
| |
InlineQueryResultCachedDocument | Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only pdf-files and zip archives can be sent using this method. |
| |
InlineQueryResultCachedVideo | Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video. |
| |
InlineQueryResultCachedVoice | Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message. |
| |
InlineQueryResultCachedAudio | Represents a link to an mp3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio. |
|
Type of chat.
Parse mode for text message
data InputMessageContent Source
This object represents the content of a message to be sent as a result of an inline query.
InputTextMessageContent | Represents the content of a text message to be sent as the result of an inline query. |
| |
InputLocationMessageContent | Represents the content of a location message to be sent as the result of an inline query. |
| |
InputVenueMessageContent | Represents the content of a venue message to be sent as the result of an inline query. |
| |
InputContactMessageContent | Represents the content of a contact message to be sent as the result of an inline query. |
|
data KeyboardButton Source
KeyboardButton | |
|
Functions
inlineQueryResultAudio :: Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultContact :: Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultDocument :: Text -> Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultGif :: Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultLocation :: Text -> Float -> Float -> Text -> InlineQueryResult Source
inlineQueryResultMpeg4Gif :: Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultPhoto :: Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultVenue :: Text -> Float -> Float -> Text -> Text -> InlineQueryResult Source
inlineQueryResultVideo :: Text -> Text -> Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultVoice :: Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultCachedDocument :: Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultCachedVideo :: Text -> Text -> Text -> InlineQueryResult Source
inlineQueryResultCachedVoice :: Text -> Text -> Text -> InlineQueryResult Source