Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains objects which represent data of Telegram Bot API responses
- data User = User {}
- newtype LanguageCode = LanguageCode Text
- data ChatMember = ChatMember {}
- 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_from_message_id :: Maybe Int
- forward_date :: Maybe Int
- reply_to_message :: Maybe Message
- edit_date :: Maybe Int
- text :: Maybe Text
- entities :: Maybe [MessageEntity]
- audio :: Maybe Audio
- document :: Maybe Document
- game :: Maybe Game
- 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 Int64
- migrate_from_chat_id :: Maybe Int64
- pinned_message :: Maybe Message
- invoice :: Maybe Invoice
- successful_payment :: Maybe SuccessfulPayment
- video_note :: Maybe VideoNote
- new_chat_members :: Maybe [User]
- data MessageEntity = MessageEntity {}
- data PhotoSize = PhotoSize {}
- data Audio = Audio {}
- data Document = Document {}
- data Game = Game {}
- data Animation = Animation {}
- data Sticker = Sticker {}
- data Video = Video {}
- data Voice = Voice {}
- data VideoNote = VideoNote {}
- data Venue = Venue {}
- data Contact = Contact {}
- data Location = Location {}
- data Update = Update {
- update_id :: Int
- message :: Maybe Message
- edited_message :: Maybe Message
- channel_post :: Maybe Message
- edited_channel_post :: Maybe Message
- inline_query :: Maybe InlineQuery
- chosen_inline_result :: Maybe ChosenInlineResult
- callback_query :: Maybe CallbackQuery
- shipping_query :: Maybe ShippingQuery
- pre_checkout_query :: Maybe PreCheckoutQuery
- 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 {
- iq_res_id :: Text
- iq_res_gif_url :: Text
- iq_res_gif_width :: Maybe Int
- iq_res_gif_height :: Maybe Int
- iq_res_thumb_url :: Maybe Text
- iq_res_title :: Maybe Text
- iq_res_caption :: Maybe Text
- iq_res_reply_markup :: Maybe InlineKeyboardMarkup
- iq_res_input_message_content :: Maybe InputMessageContent
- iq_res_gif_duration :: Maybe Int
- | InlineQueryResultMpeg4Gif {
- iq_res_id :: Text
- iq_res_mpeg4_url :: Text
- iq_res_mpeg4_width :: Maybe Int
- iq_res_mpeg4_height :: Maybe Int
- iq_res_thumb_url :: Maybe Text
- iq_res_title :: Maybe Text
- iq_res_caption :: Maybe Text
- iq_res_reply_markup :: Maybe InlineKeyboardMarkup
- iq_res_input_message_content :: Maybe InputMessageContent
- iq_res_mpeg4_duration :: Maybe Int
- | 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 { }
- | InlineQueryResultGame { }
- | InlineQueryResultCachedPhoto { }
- | InlineQueryResultCachedGif { }
- | InlineQueryResultCachedMpeg4Gif { }
- | InlineQueryResultCachedSticker { }
- | InlineQueryResultCachedDocument { }
- | InlineQueryResultCachedVideo { }
- | InlineQueryResultCachedVoice { }
- | InlineQueryResultCachedAudio { }
- = InlineQueryResultArticle {
- data InlineKeyboardMarkup = InlineKeyboardMarkup {}
- data InlineKeyboardButton = InlineKeyboardButton {}
- data CallbackGame = CallbackGame {
- data CallbackQuery = CallbackQuery {}
- data ChatType
- = Private
- | Group
- | Supergroup
- | Channel
- data ParseMode
- data InputMessageContent
- data KeyboardButton = KeyboardButton {}
- data WebhookInfo = WebhookInfo {}
- data LabeledPrice = LabeledPrice {}
- newtype CurrencyCode = CurrencyCode Text
- data Invoice = Invoice {}
- data ShippingAddress = ShippingAddress {}
- data OrderInfo = OrderInfo {}
- data ShippingOption = ShippingOption {}
- data SuccessfulPayment = SuccessfulPayment {}
- data ShippingQuery = ShippingQuery {}
- data PreCheckoutQuery = PreCheckoutQuery {}
- 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
- inlineQueryResultGame :: 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 | |
|
newtype LanguageCode Source #
data ChatMember Source #
This object represents a chat.
Chat | |
|
This object represents a message.
Message | |
|
data MessageEntity Source #
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
MessageEntity | |
|
PhotoSize | |
|
This object represents an audio file to be treated as music by the Telegram clients.
Audio | |
|
Document | |
|
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
Game | |
|
This object represents an animation file to be displayed in the message containing a game.
Animation | |
|
This object represents a sticker.
Sticker | |
|
This object represents a video file.
Video | |
|
This object represents a voice note.
Voice | |
|
VideoNote | |
|
This object represents a venue.
Venue | |
|
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. |
| |
InlineQueryResultGame | Represents a Game. |
| |
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. |
|
data InlineKeyboardMarkup Source #
data InlineKeyboardButton Source #
InlineKeyboardButton | |
|
data CallbackGame Source #
data CallbackQuery Source #
CallbackQuery | |
|
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 | |
|
data WebhookInfo Source #
WebhookInfo | |
|
data LabeledPrice Source #
LabeledPrice | This object represents a portion of the price for goods or services. |
|
newtype CurrencyCode Source #
Invoice | This object contains basic information about an invoice. |
|
data ShippingAddress Source #
ShippingAddress | |
|
OrderInfo | |
|
data ShippingOption Source #
ShippingOption | |
|
data SuccessfulPayment Source #
SuccessfulPayment | |
|
data ShippingQuery Source #
ShippingQuery | |
|
data PreCheckoutQuery Source #
PreCheckoutQuery | |
|
Functions
keyboardButton :: Text -> KeyboardButton Source #
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 #
inlineQueryResultGame :: Text -> Text -> InlineQueryResult Source #
inlineQueryResultCachedVideo :: Text -> Text -> Text -> InlineQueryResult Source #
inlineQueryResultCachedVoice :: Text -> Text -> Text -> InlineQueryResult Source #