Package com.github.omarmiatello.telegram

Types

Animation
Link copied to clipboard
data class Animation(file_id: String, file_unique_id: String, width: Long, height: Long, duration: Long, thumb: PhotoSize?, file_name: String?, mime_type: String?, file_size: Long?) : TelegramModel

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).

Audio
Link copied to clipboard
data class Audio(file_id: String, file_unique_id: String, duration: Long, performer: String?, title: String?, file_name: String?, mime_type: String?, file_size: Long?, thumb: PhotoSize?) : TelegramModel

This object represents an audio file to be treated as music by the Telegram clients.

BotCommand
Link copied to clipboard
data class BotCommand(command: String, description: String) : TelegramModel

This object represents a bot command.

BotCommandScope
Link copied to clipboard
sealed class BotCommandScope : TelegramModel
BotCommandScopeAllChatAdministrators
Link copied to clipboard
data class BotCommandScopeAllChatAdministrators(type: String) : BotCommandScope

Represents the scope of bot commands, covering all group and supergroup chat administrators.

BotCommandScopeAllGroupChats
Link copied to clipboard
data class BotCommandScopeAllGroupChats(type: String) : BotCommandScope

Represents the scope of bot commands, covering all group and supergroup chats.

BotCommandScopeAllPrivateChats
Link copied to clipboard
data class BotCommandScopeAllPrivateChats(type: String) : BotCommandScope

Represents the scope of bot commands, covering all private chats.

BotCommandScopeChat
Link copied to clipboard
data class BotCommandScopeChat(type: String, chat_id: String) : BotCommandScope

Represents the scope of bot commands, covering a specific chat.

BotCommandScopeChatAdministrators
Link copied to clipboard
data class BotCommandScopeChatAdministrators(type: String, chat_id: String) : BotCommandScope

Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.

BotCommandScopeChatMember
Link copied to clipboard
data class BotCommandScopeChatMember(type: String, chat_id: String, user_id: Long) : BotCommandScope

Represents the scope of bot commands, covering a specific member of a group or supergroup chat.

BotCommandScopeDefault
Link copied to clipboard
data class BotCommandScopeDefault(type: String) : BotCommandScope

Represents the default scope of bot commands.

CallbackQuery
Link copied to clipboard
data class CallbackQuery(id: String, from: User, message: Message?, inline_message_id: String?, chat_instance: String, data: String?, game_short_name: String?) : TelegramModel

This object represents an incoming callback query from a callback button in an inline keyboard.

Chat
Link copied to clipboard
data class Chat(id: Long, type: String, title: String?, username: String?, first_name: String?, last_name: String?, photo: ChatPhoto?, bio: String?, description: String?, invite_link: String?, pinned_message: Message?, permissions: ChatPermissions?, slow_mode_delay: Long?, message_auto_delete_time: Long?, sticker_set_name: String?, can_set_sticker_set: Boolean?, linked_chat_id: Long?, location: ChatLocation?) : TelegramModel

This object represents a chat.

ChatInviteLink
Link copied to clipboard
data class ChatInviteLink(invite_link: String, creator: User, is_primary: Boolean, is_revoked: Boolean, expire_date: Long?, member_limit: Long?) : TelegramModel

Represents an invite link for a chat.

ChatLocation
Link copied to clipboard
data class ChatLocation(location: Location, address: String) : TelegramModel

Represents a location to which a chat is connected.

ChatMember
Link copied to clipboard
sealed class ChatMember : TelegramModel
ChatMemberAdministrator
Link copied to clipboard
data class ChatMemberAdministrator(status: String, user: User, can_be_edited: Boolean, is_anonymous: Boolean, can_manage_chat: Boolean, can_delete_messages: Boolean, can_manage_voice_chats: Boolean, can_restrict_members: Boolean, can_promote_members: Boolean, can_change_info: Boolean, can_invite_users: Boolean, can_post_messages: Boolean?, can_edit_messages: Boolean?, can_pin_messages: Boolean?, custom_title: String?) : ChatMember

Represents a chat member that has some additional privileges.

ChatMemberBanned
Link copied to clipboard
data class ChatMemberBanned(status: String, user: User, until_date: Long) : ChatMember

Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.

ChatMemberLeft
Link copied to clipboard
data class ChatMemberLeft(status: String, user: User) : ChatMember

Represents a chat member that isn't currently a member of the chat, but may join it themselves.

ChatMemberMember
Link copied to clipboard
data class ChatMemberMember(status: String, user: User) : ChatMember

Represents a chat member that has no additional privileges or restrictions.

ChatMemberOwner
Link copied to clipboard
data class ChatMemberOwner(status: String, user: User, is_anonymous: Boolean, custom_title: String?) : ChatMember

Represents a chat member that owns the chat and has all administrator privileges.

ChatMemberRestricted
Link copied to clipboard
data class ChatMemberRestricted(status: String, user: User, is_member: Boolean, can_change_info: Boolean, can_invite_users: Boolean, can_pin_messages: Boolean, can_send_messages: Boolean, can_send_media_messages: Boolean, can_send_polls: Boolean, can_send_other_messages: Boolean, can_add_web_page_previews: Boolean, until_date: Long) : ChatMember

Represents a chat member that is under certain restrictions in the chat.

ChatMemberUpdated
Link copied to clipboard
data class ChatMemberUpdated(chat: Chat, from: User, date: Long, old_chat_member: ChatMember, new_chat_member: ChatMember, invite_link: ChatInviteLink?) : ChatMember

This object represents changes in the status of a chat member.

ChatPermissions
Link copied to clipboard
data class ChatPermissions(can_send_messages: Boolean?, can_send_media_messages: Boolean?, can_send_polls: Boolean?, can_send_other_messages: Boolean?, can_add_web_page_previews: Boolean?, can_change_info: Boolean?, can_invite_users: Boolean?, can_pin_messages: Boolean?) : TelegramModel

Describes actions that a non-administrator user is allowed to take in a chat.

ChatPhoto
Link copied to clipboard
data class ChatPhoto(small_file_id: String, small_file_unique_id: String, big_file_id: String, big_file_unique_id: String) : TelegramModel

This object represents a chat photo.

ChosenInlineResult
Link copied to clipboard
data class ChosenInlineResult(result_id: String, from: User, location: Location?, inline_message_id: String?, query: String) : TelegramModel

Represents a result of an inline query that was chosen by the user and sent to their chat partner.

Note: It is necessary to enable inline feedback via @Botfather in order to receive these objects in updates.

Contact
Link copied to clipboard
data class Contact(phone_number: String, first_name: String, last_name: String?, user_id: Long?, vcard: String?) : TelegramModel

This object represents a phone contact.

Dice
Link copied to clipboard
data class Dice(emoji: String, value: Long) : TelegramModel

This object represents an animated emoji that displays a random value.

Document
Link copied to clipboard
data class Document(file_id: String, file_unique_id: String, thumb: PhotoSize?, file_name: String?, mime_type: String?, file_size: Long?) : TelegramModel

This object represents a general file (as opposed to photos, voice messages and audio files).

EncryptedCredentials
Link copied to clipboard
data class EncryptedCredentials(data: String, hash: String, secret: String) : TelegramModel

Contains data required for decrypting and authenticating EncryptedPassportElement.

EncryptedPassportElement
Link copied to clipboard
data class EncryptedPassportElement(type: String, data: String?, phone_number: String?, email: String?, files: List<PassportFile>?, front_side: PassportFile?, reverse_side: PassportFile?, selfie: PassportFile?, translation: List<PassportFile>?, hash: String) : TelegramModel

Contains information about documents or other Telegram Passport elements shared with the bot by the user.

File
Link copied to clipboard
data class File(file_id: String, file_unique_id: String, file_size: Long?, file_path: String?) : TelegramModel

This object represents a file ready to be downloaded.

ForceReply
Link copied to clipboard
data class ForceReply(force_reply: Boolean, input_field_placeholder: String?, selective: Boolean?) : KeyboardOption

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').

Game
Link copied to clipboard
data class Game(title: String, description: String, photo: List<PhotoSize>, text: String?, text_entities: List<MessageEntity>?, animation: Animation?) : TelegramModel

This object represents a game.

GameHighScore
Link copied to clipboard
data class GameHighScore(position: Long, user: User, score: Long) : TelegramModel

This object represents one row of the high scores table for a game.

And that's about all we've got for now.

InlineKeyboardButton
Link copied to clipboard
data class InlineKeyboardButton(text: String, url: String?, login_url: LoginUrl?, callback_data: String?, switch_inline_query: String?, switch_inline_query_current_chat: String?, callback_game: Any?, pay: Boolean?) : TelegramModel

This object represents one button of an inline keyboard.

InlineKeyboardMarkup
Link copied to clipboard
data class InlineKeyboardMarkup(inline_keyboard: List<List<InlineKeyboardButton>>) : KeyboardOption

This object represents an inline keyboard that appears right next to the message it belongs to.

Note: This will only work in Telegram versions released after 9 April, 2016.

InlineQuery
Link copied to clipboard
data class InlineQuery(id: String, from: User, query: String, offset: String, chat_type: String?, location: Location?) : TelegramModel

This object represents an incoming inline query.

InlineQueryResult
Link copied to clipboard
sealed class InlineQueryResult : TelegramModel
InlineQueryResultArticle
Link copied to clipboard
data class InlineQueryResultArticle(type: String, id: String, title: String, input_message_content: InputMessageContent, reply_markup: InlineKeyboardMarkup?, url: String?, hide_url: Boolean?, description: String?, thumb_url: String?, thumb_width: Long?, thumb_height: Long?) : InlineQueryResult

Represents a link to an article or web page.

InlineQueryResultAudio
Link copied to clipboard
data class InlineQueryResultAudio(type: String, id: String, audio_url: String, title: String, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, performer: String?, audio_duration: Long?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to an MP3 audio file.

InlineQueryResultCachedAudio
Link copied to clipboard
data class InlineQueryResultCachedAudio(type: String, id: String, audio_file_id: String, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to an MP3 audio file stored on the Telegram servers.

InlineQueryResultCachedDocument
Link copied to clipboard
data class InlineQueryResultCachedDocument(type: String, id: String, title: String, document_file_id: String, description: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a file stored on the Telegram servers.

InlineQueryResultCachedGif
Link copied to clipboard
data class InlineQueryResultCachedGif(type: String, id: String, gif_file_id: String, title: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to an animated GIF file stored on the Telegram servers.

InlineQueryResultCachedMpeg4Gif
Link copied to clipboard
data class InlineQueryResultCachedMpeg4Gif(type: String, id: String, mpeg4_file_id: String, title: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers.

InlineQueryResultCachedPhoto
Link copied to clipboard
data class InlineQueryResultCachedPhoto(type: String, id: String, photo_file_id: String, title: String?, description: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a photo stored on the Telegram servers.

InlineQueryResultCachedSticker
Link copied to clipboard
data class InlineQueryResultCachedSticker(type: String, id: String, sticker_file_id: String, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a sticker stored on the Telegram servers.

InlineQueryResultCachedVideo
Link copied to clipboard
data class InlineQueryResultCachedVideo(type: String, id: String, video_file_id: String, title: String, description: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a video file stored on the Telegram servers.

InlineQueryResultCachedVoice
Link copied to clipboard
data class InlineQueryResultCachedVoice(type: String, id: String, voice_file_id: String, title: String, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a voice message stored on the Telegram servers.

InlineQueryResultContact
Link copied to clipboard
data class InlineQueryResultContact(type: String, id: String, phone_number: String, first_name: String, last_name: String?, vcard: String?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?, thumb_url: String?, thumb_width: Long?, thumb_height: Long?) : InlineQueryResult

Represents a contact with a phone number.

InlineQueryResultDocument
Link copied to clipboard
data class InlineQueryResultDocument(type: String, id: String, title: String, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, document_url: String, mime_type: String, description: String?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?, thumb_url: String?, thumb_width: Long?, thumb_height: Long?) : InlineQueryResult

Represents a link to a file.

InlineQueryResultGame
Link copied to clipboard
data class InlineQueryResultGame(type: String, id: String, game_short_name: String, reply_markup: InlineKeyboardMarkup?) : InlineQueryResult

Represents a Game.

Note: This will only work in Telegram versions released after October 1, 2016.

InlineQueryResultGif
Link copied to clipboard
data class InlineQueryResultGif(type: String, id: String, gif_url: String, gif_width: Long?, gif_height: Long?, gif_duration: Long?, thumb_url: String, thumb_mime_type: String?, title: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to an animated GIF file.

InlineQueryResultLocation
Link copied to clipboard
data class InlineQueryResultLocation(type: String, id: String, latitude: Float, longitude: Float, title: String, horizontal_accuracy: Float?, live_period: Long?, heading: Long?, proximity_alert_radius: Long?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?, thumb_url: String?, thumb_width: Long?, thumb_height: Long?) : InlineQueryResult

Represents a location on a map.

InlineQueryResultMpeg4Gif
Link copied to clipboard
data class InlineQueryResultMpeg4Gif(type: String, id: String, mpeg4_url: String, mpeg4_width: Long?, mpeg4_height: Long?, mpeg4_duration: Long?, thumb_url: String, thumb_mime_type: String?, title: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound).

InlineQueryResultPhoto
Link copied to clipboard
data class InlineQueryResultPhoto(type: String, id: String, photo_url: String, thumb_url: String, photo_width: Long?, photo_height: Long?, title: String?, description: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a photo.

InlineQueryResultVenue
Link copied to clipboard
data class InlineQueryResultVenue(type: String, id: String, latitude: Float, longitude: Float, title: String, address: String, foursquare_id: String?, foursquare_type: String?, google_place_id: String?, google_place_type: String?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?, thumb_url: String?, thumb_width: Long?, thumb_height: Long?) : InlineQueryResult

Represents a venue.

InlineQueryResultVideo
Link copied to clipboard
data class InlineQueryResultVideo(type: String, id: String, video_url: String, mime_type: String, thumb_url: String, title: String, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, video_width: Long?, video_height: Long?, video_duration: Long?, description: String?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a page containing an embedded video player or a video file.

InlineQueryResultVoice
Link copied to clipboard
data class InlineQueryResultVoice(type: String, id: String, voice_url: String, title: String, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, voice_duration: Long?, reply_markup: InlineKeyboardMarkup?, input_message_content: InputMessageContent?) : InlineQueryResult

Represents a link to a voice recording in an .OGG container encoded with OPUS.

InputContactMessageContent
Link copied to clipboard
data class InputContactMessageContent(phone_number: String, first_name: String, last_name: String?, vcard: String?) : TelegramModel

Represents the content of a contact message to be sent as the result of an inline query.

InputInvoiceMessageContent
Link copied to clipboard
data class InputInvoiceMessageContent(title: String, description: String, payload: String, provider_token: String, currency: String, prices: List<LabeledPrice>, max_tip_amount: Long?, suggested_tip_amounts: List<Long>?, provider_data: String?, photo_url: String?, photo_size: Long?, photo_width: Long?, photo_height: Long?, need_name: Boolean?, need_phone_number: Boolean?, need_email: Boolean?, need_shipping_address: Boolean?, send_phone_number_to_provider: Boolean?, send_email_to_provider: Boolean?, is_flexible: Boolean?) : TelegramModel

Represents the content of an invoice message to be sent as the result of an inline query.

InputLocationMessageContent
Link copied to clipboard
data class InputLocationMessageContent(latitude: Float, longitude: Float, horizontal_accuracy: Float?, live_period: Long?, heading: Long?, proximity_alert_radius: Long?) : TelegramModel

Represents the content of a location message to be sent as the result of an inline query.

InputMedia
Link copied to clipboard
sealed class InputMedia : TelegramModel
InputMediaAnimation
Link copied to clipboard
data class InputMediaAnimation(type: String, media: String, thumb: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, width: Long?, height: Long?, duration: Long?) : InputMedia

Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.

InputMediaAudio
Link copied to clipboard
data class InputMediaAudio(type: String, media: String, thumb: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, duration: Long?, performer: String?, title: String?) : InputMedia

Represents an audio file to be treated as music to be sent.

InputMediaDocument
Link copied to clipboard
data class InputMediaDocument(type: String, media: String, thumb: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, disable_content_type_detection: Boolean?) : InputMedia

Represents a general file to be sent.

InputMediaPhoto
Link copied to clipboard
data class InputMediaPhoto(type: String, media: String, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?) : InputMedia

Represents a photo to be sent.

InputMediaVideo
Link copied to clipboard
data class InputMediaVideo(type: String, media: String, thumb: String?, caption: String?, parse_mode: ParseMode?, caption_entities: List<MessageEntity>?, width: Long?, height: Long?, duration: Long?, supports_streaming: Boolean?) : InputMedia

Represents a video to be sent.

InputMessageContent
Link copied to clipboard
sealed class InputMessageContent : TelegramModel
InputTextMessageContent
Link copied to clipboard
data class InputTextMessageContent(message_text: String, parse_mode: ParseMode?, entities: List<MessageEntity>?, disable_web_page_preview: Boolean?) : InputMessageContent

Represents the content of a text message to be sent as the result of an inline query.

InputVenueMessageContent
Link copied to clipboard
data class InputVenueMessageContent(latitude: Float, longitude: Float, title: String, address: String, foursquare_id: String?, foursquare_type: String?, google_place_id: String?, google_place_type: String?) : TelegramModel

Represents the content of a venue message to be sent as the result of an inline query.

Invoice
Link copied to clipboard
data class Invoice(title: String, description: String, start_parameter: String, currency: String, total_amount: Long) : TelegramModel

This object contains basic information about an invoice.

KeyboardButton
Link copied to clipboard
data class KeyboardButton(text: String, request_contact: Boolean?, request_location: Boolean?, request_poll: KeyboardButtonPollType?) : TelegramModel

This object represents one button of the reply keyboard.

KeyboardButtonPollType
Link copied to clipboard
data class KeyboardButtonPollType(type: String?) : TelegramModel

This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.

KeyboardOption
Link copied to clipboard
sealed class KeyboardOption : TelegramModel
LabeledPrice
Link copied to clipboard
data class LabeledPrice(label: String, amount: Long) : TelegramModel

This object represents a portion of the price for goods or services.

Location
Link copied to clipboard
data class Location(longitude: Float, latitude: Float, horizontal_accuracy: Float?, live_period: Long?, heading: Long?, proximity_alert_radius: Long?) : TelegramModel

This object represents a point on the map.

LoginUrl
Link copied to clipboard
data class LoginUrl(url: String, forward_text: String?, bot_username: String?, request_write_access: Boolean?) : TelegramModel

This object represents a parameter of the inline keyboard button used to automatically authorize a user.

MaskPosition
Link copied to clipboard
data class MaskPosition(point: String, x_shift: Float, y_shift: Float, scale: Float) : TelegramModel

This object describes the position on faces where a mask should be placed by default.

Message
Link copied to clipboard
data class Message(message_id: Long, from: User?, sender_chat: Chat?, date: Long, chat: Chat, forward_from: User?, forward_from_chat: Chat?, forward_from_message_id: Long?, forward_signature: String?, forward_sender_name: String?, forward_date: Long?, reply_to_message: Message?, via_bot: User?, edit_date: Long?, media_group_id: String?, author_signature: String?, text: String?, entities: List<MessageEntity>?, animation: Animation?, audio: Audio?, document: Document?, photo: List<PhotoSize>?, sticker: Sticker?, video: Video?, video_note: VideoNote?, voice: Voice?, caption: String?, caption_entities: List<MessageEntity>?, contact: Contact?, dice: Dice?, game: Game?, poll: Poll?, venue: Venue?, location: Location?, new_chat_members: List<User>?, left_chat_member: User?, new_chat_title: String?, new_chat_photo: List<PhotoSize>?, delete_chat_photo: Boolean?, group_chat_created: Boolean?, supergroup_chat_created: Boolean?, channel_chat_created: Boolean?, message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged?, migrate_to_chat_id: Long?, migrate_from_chat_id: Long?, pinned_message: Message?, invoice: Invoice?, successful_payment: SuccessfulPayment?, connected_website: String?, passport_data: PassportData?, proximity_alert_triggered: ProximityAlertTriggered?, voice_chat_scheduled: VoiceChatScheduled?, voice_chat_started: VoiceChatStarted?, voice_chat_ended: VoiceChatEnded?, voice_chat_participants_invited: VoiceChatParticipantsInvited?, reply_markup: InlineKeyboardMarkup?) : TelegramModel

This object represents a message.

MessageAutoDeleteTimerChanged
Link copied to clipboard
data class MessageAutoDeleteTimerChanged(message_auto_delete_time: Long) : TelegramModel

This object represents a service message about a change in auto-delete timer settings.

MessageEntity
Link copied to clipboard
data class MessageEntity(type: String, offset: Long, length: Long, url: String?, user: User?, language: String?) : TelegramModel

This object represents one special entity in a text message.

MessageId
Link copied to clipboard
data class MessageId(message_id: Long) : TelegramModel

This object represents a unique message identifier.

OrderInfo
Link copied to clipboard
data class OrderInfo(name: String?, phone_number: String?, email: String?, shipping_address: ShippingAddress?) : TelegramModel

This object represents information about an order.

ParseMode
Link copied to clipboard
enum ParseMode : Enum<ParseMode>
PassportData
Link copied to clipboard
data class PassportData(data: List<EncryptedPassportElement>, credentials: EncryptedCredentials) : TelegramModel

Contains information about Telegram Passport data shared with the bot by the user.

PassportElementError
Link copied to clipboard
sealed class PassportElementError : TelegramModel
PassportElementErrorDataField
Link copied to clipboard
data class PassportElementErrorDataField(source: String, type: String, field_name: String, data_hash: String, message: String) : PassportElementError

Represents an issue in one of the data fields that was provided by the user.

PassportElementErrorFile
Link copied to clipboard
data class PassportElementErrorFile(source: String, type: String, file_hash: String, message: String) : PassportElementError

Represents an issue with a document scan.

PassportElementErrorFiles
Link copied to clipboard
data class PassportElementErrorFiles(source: String, type: String, file_hashes: List<String>, message: String) : PassportElementError

Represents an issue with a list of scans.

PassportElementErrorFrontSide
Link copied to clipboard
data class PassportElementErrorFrontSide(source: String, type: String, file_hash: String, message: String) : PassportElementError

Represents an issue with the front side of a document.

PassportElementErrorReverseSide
Link copied to clipboard
data class PassportElementErrorReverseSide(source: String, type: String, file_hash: String, message: String) : PassportElementError

Represents an issue with the reverse side of a document.

PassportElementErrorSelfie
Link copied to clipboard
data class PassportElementErrorSelfie(source: String, type: String, file_hash: String, message: String) : PassportElementError

Represents an issue with the selfie with a document.

PassportElementErrorTranslationFile
Link copied to clipboard
data class PassportElementErrorTranslationFile(source: String, type: String, file_hash: String, message: String) : PassportElementError

Represents an issue with one of the files that constitute the translation of a document.

PassportElementErrorTranslationFiles
Link copied to clipboard
data class PassportElementErrorTranslationFiles(source: String, type: String, file_hashes: List<String>, message: String) : PassportElementError

Represents an issue with the translated version of a document.

PassportElementErrorUnspecified
Link copied to clipboard
data class PassportElementErrorUnspecified(source: String, type: String, element_hash: String, message: String) : PassportElementError

Represents an issue in an unspecified place.

PassportFile
Link copied to clipboard
data class PassportFile(file_id: String, file_unique_id: String, file_size: Long, file_date: Long) : TelegramModel

This object represents a file uploaded to Telegram Passport.

PhotoSize
Link copied to clipboard
data class PhotoSize(file_id: String, file_unique_id: String, width: Long, height: Long, file_size: Long?) : TelegramModel

This object represents one size of a photo or a file / sticker thumbnail.

Poll
Link copied to clipboard
data class Poll(id: String, question: String, options: List<PollOption>, total_voter_count: Long, is_closed: Boolean, is_anonymous: Boolean, type: String, allows_multiple_answers: Boolean, correct_option_id: Long?, explanation: String?, explanation_entities: List<MessageEntity>?, open_period: Long?, close_date: Long?) : TelegramModel

This object contains information about a poll.

PollAnswer
Link copied to clipboard
data class PollAnswer(poll_id: String, user: User, option_ids: List<Long>) : TelegramModel

This object represents an answer of a user in a non-anonymous poll.

PollOption
Link copied to clipboard
data class PollOption(text: String, voter_count: Long) : TelegramModel

This object contains information about one answer option in a poll.

PreCheckoutQuery
Link copied to clipboard
data class PreCheckoutQuery(id: String, from: User, currency: String, total_amount: Long, invoice_payload: String, shipping_option_id: String?, order_info: OrderInfo?) : TelegramModel

This object contains information about an incoming pre-checkout query.

ProximityAlertTriggered
Link copied to clipboard
data class ProximityAlertTriggered(traveler: User, watcher: User, distance: Long) : TelegramModel

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.

ReplyKeyboardMarkup
Link copied to clipboard
data class ReplyKeyboardMarkup(keyboard: List<List<KeyboardButton>>, resize_keyboard: Boolean?, one_time_keyboard: Boolean?, input_field_placeholder: String?, selective: Boolean?) : KeyboardOption

This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).

ReplyKeyboardRemove
Link copied to clipboard
data class ReplyKeyboardRemove(remove_keyboard: Boolean, selective: Boolean?) : KeyboardOption

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.

ResponseParameters
Link copied to clipboard
data class ResponseParameters(migrate_to_chat_id: Long?, retry_after: Long?) : TelegramModel

Contains information about why a request was unsuccessful.

ShippingAddress
Link copied to clipboard
data class ShippingAddress(country_code: String, state: String, city: String, street_line1: String, street_line2: String, post_code: String) : TelegramModel

This object represents a shipping address.

ShippingOption
Link copied to clipboard
data class ShippingOption(id: String, title: String, prices: List<LabeledPrice>) : TelegramModel

This object represents one shipping option.

ShippingQuery
Link copied to clipboard
data class ShippingQuery(id: String, from: User, invoice_payload: String, shipping_address: ShippingAddress) : TelegramModel

This object contains information about an incoming shipping query.

Sticker
Link copied to clipboard
data class Sticker(file_id: String, file_unique_id: String, width: Long, height: Long, is_animated: Boolean, thumb: PhotoSize?, emoji: String?, set_name: String?, mask_position: MaskPosition?, file_size: Long?) : TelegramModel

This object represents a sticker.

StickerSet
Link copied to clipboard
data class StickerSet(name: String, title: String, is_animated: Boolean, contains_masks: Boolean, stickers: List<Sticker>, thumb: PhotoSize?) : TelegramModel

This object represents a sticker set.

SuccessfulPayment
Link copied to clipboard
data class SuccessfulPayment(currency: String, total_amount: Long, invoice_payload: String, shipping_option_id: String?, order_info: OrderInfo?, telegram_payment_charge_id: String, provider_payment_charge_id: String) : TelegramModel

This object contains basic information about a successful payment.

TelegramModel
Link copied to clipboard
sealed class TelegramModel
TelegramRequest
Link copied to clipboard
sealed class TelegramRequest
TelegramResponse
Link copied to clipboard
data class TelegramResponse<T>(ok: Boolean, result: T)
Update
Link copied to clipboard
data class Update(update_id: Long, message: Message?, edited_message: Message?, channel_post: Message?, edited_channel_post: Message?, inline_query: InlineQuery?, chosen_inline_result: ChosenInlineResult?, callback_query: CallbackQuery?, shipping_query: ShippingQuery?, pre_checkout_query: PreCheckoutQuery?, poll: Poll?, poll_answer: PollAnswer?, my_chat_member: ChatMemberUpdated?, chat_member: ChatMemberUpdated?) : TelegramModel

This object represents an incoming update.
At most one of the optional parameters can be present in any given update.

User
Link copied to clipboard
data class User(id: Long, is_bot: Boolean, first_name: String, last_name: String?, username: String?, language_code: String?, can_join_groups: Boolean?, can_read_all_group_messages: Boolean?, supports_inline_queries: Boolean?) : TelegramModel

This object represents a Telegram user or bot.

UserProfilePhotos
Link copied to clipboard
data class UserProfilePhotos(total_count: Long, photos: List<List<PhotoSize>>) : TelegramModel

This object represent a user's profile pictures.

Venue
Link copied to clipboard
data class Venue(location: Location, title: String, address: String, foursquare_id: String?, foursquare_type: String?, google_place_id: String?, google_place_type: String?) : TelegramModel

This object represents a venue.

Video
Link copied to clipboard
data class Video(file_id: String, file_unique_id: String, width: Long, height: Long, duration: Long, thumb: PhotoSize?, file_name: String?, mime_type: String?, file_size: Long?) : TelegramModel

This object represents a video file.

VideoNote
Link copied to clipboard
data class VideoNote(file_id: String, file_unique_id: String, length: Long, duration: Long, thumb: PhotoSize?, file_size: Long?) : TelegramModel

This object represents a video message (available in Telegram apps as of v.4.0).

Voice
Link copied to clipboard
data class Voice(file_id: String, file_unique_id: String, duration: Long, mime_type: String?, file_size: Long?) : TelegramModel

This object represents a voice note.

VoiceChatEnded
Link copied to clipboard
data class VoiceChatEnded(duration: Long) : TelegramModel

This object represents a service message about a voice chat ended in the chat.

VoiceChatParticipantsInvited
Link copied to clipboard
data class VoiceChatParticipantsInvited(users: List<User>?) : TelegramModel

This object represents a service message about new members invited to a voice chat.

VoiceChatScheduled
Link copied to clipboard
data class VoiceChatScheduled(start_date: Long) : TelegramModel

This object represents a service message about a voice chat scheduled in the chat.

VoiceChatStarted
Link copied to clipboard
sealed class VoiceChatStarted : TelegramModel
WebhookInfo
Link copied to clipboard
data class WebhookInfo(url: String, has_custom_certificate: Boolean, pending_update_count: Long, ip_address: String?, last_error_date: Long?, last_error_message: String?, max_connections: Long?, allowed_updates: List<String>?) : TelegramModel

Contains information about the current status of a webhook.