package bots
- Alphabetic
- Public
- All
Type Members
-
final
case class
Animation(fileId: String, fileUniqueId: String, width: Int, height: Int, duration: Int, thumb: Option[PhotoSize] = Option.empty, fileName: Option[String] = Option.empty, mimeType: Option[String] = Option.empty, fileSize: Option[Int] = Option.empty) extends Product with Serializable
This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- width
Video width as defined by sender
- height
Video height as defined by sender
- duration
Duration of the video in seconds as defined by sender
- thumb
Optional. Animation thumbnail as defined by sender
- fileName
Optional. Original animation filename as defined by sender
- mimeType
Optional. MIME type of the file as defined by sender
- fileSize
Optional. File size
-
final
case class
Audio(fileId: String, fileUniqueId: String, duration: Int, performer: Option[String] = Option.empty, title: Option[String] = Option.empty, fileName: Option[String] = Option.empty, mimeType: Option[String] = Option.empty, fileSize: Option[Int] = Option.empty, thumb: Option[PhotoSize] = Option.empty) extends Product with Serializable
This object represents an audio file to be treated as music by the Telegram clients.
This object represents an audio file to be treated as music by the Telegram clients.
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- duration
Duration of the audio in seconds as defined by sender
- performer
Optional. Performer of the audio as defined by sender or by audio tags
- title
Optional. Title of the audio as defined by sender or by audio tags
- fileName
Optional. Original filename as defined by sender
- mimeType
Optional. MIME type of the file as defined by sender
- fileSize
Optional. File size
- thumb
Optional. Thumbnail of the album cover to which the music file belongs
-
final
case class
BoldMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
bold
bold
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
BotCommand(command: String, description: String) extends Product with Serializable
This object represents a bot command.
This object represents a bot command.
- command
Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores.
- description
Description of the command, 3-256 characters.
-
final
case class
BotCommandMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
bot_command
bot_command
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
- sealed trait BotCommandScope extends AnyRef
-
final
case class
BotCommandScopeChat(chatId: ChatId) extends BotCommandScope with Product with Serializable
Represents the scope of bot commands, covering a specific chat.
Represents the scope of bot commands, covering a specific chat.
- chatId
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
-
final
case class
BotCommandScopeChatAdministrators(chatId: ChatId) extends BotCommandScope with Product with Serializable
Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
- chatId
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
-
final
case class
BotCommandScopeChatMember(chatId: ChatId, userId: Long) extends BotCommandScope with Product with Serializable
Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
- chatId
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
- userId
Unique identifier of the target user
-
final
case class
CallbackQuery(id: String, from: User, message: Option[Message] = Option.empty, inlineMessageId: Option[String] = Option.empty, chatInstance: String, data: Option[String] = Option.empty, gameShortName: Option[String] = Option.empty) extends Product with Serializable
This object represents an incoming callback query from a callback button in an inline keyboard.
This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
- id
Unique identifier for this query
- from
Sender
- message
Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old
- inlineMessageId
Optional. Identifier of the message sent via the bot in inline mode, that originated the query.
- chatInstance
Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
- data
Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
- gameShortName
Optional. Short name of a Game to be returned, serves as the unique identifier for the game
-
final
case class
CashtagMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
cashtag
cashtag
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
Chat(id: Long, type: String, title: Option[String] = Option.empty, username: Option[String] = Option.empty, firstName: Option[String] = Option.empty, lastName: Option[String] = Option.empty, photo: Option[ChatPhoto] = Option.empty, bio: Option[String] = Option.empty, description: Option[String] = Option.empty, inviteLink: Option[String] = Option.empty, pinnedMessage: Option[Message] = Option.empty, permissions: Option[ChatPermissions] = Option.empty, slowModeDelay: Option[Int] = Option.empty, messageAutoDeleteTime: Option[Int] = Option.empty, stickerSetName: Option[String] = Option.empty, canSetStickerSet: Option[Boolean] = Option.empty, linkedChatId: Option[Long] = Option.empty, location: Option[ChatLocation] = Option.empty) extends Product with Serializable
This object represents a chat.
This object represents a chat.
- id
Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
- type
Type of chat, can be either “private”, “group”, “supergroup” or “channel”
- title
Optional. Title, for supergroups, channels and group chats
- username
Optional. Username, for private chats, supergroups and channels if available
- firstName
Optional. First name of the other party in a private chat
- lastName
Optional. Last name of the other party in a private chat
- photo
Optional. Chat photo. Returned only in getChat.
- bio
Optional. Bio of the other party in a private chat. Returned only in getChat.
- description
Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
- inviteLink
Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
- pinnedMessage
Optional. The most recent pinned message (by sending date). Returned only in getChat.
- permissions
Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
- slowModeDelay
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in getChat.
- messageAutoDeleteTime
Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
- stickerSetName
Optional. For supergroups, name of group sticker set. Returned only in getChat.
- canSetStickerSet
Optional. True, if the bot can change the group sticker set. Returned only in getChat.
- linkedChatId
Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.
- location
Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
- sealed trait ChatId extends AnyRef
- final case class ChatIntId(id: Long) extends ChatId with Product with Serializable
-
final
case class
ChatInviteLink(inviteLink: String, creator: User, isPrimary: Boolean, isRevoked: Boolean, expireDate: Option[Int] = Option.empty, memberLimit: Option[Int] = Option.empty) extends Product with Serializable
Represents an invite link for a chat.
Represents an invite link for a chat.
- inviteLink
The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.
- creator
Creator of the link
- isPrimary
True, if the link is primary
- isRevoked
True, if the link is revoked
- expireDate
Optional. Point in time (Unix timestamp) when the link will expire or has been expired
- memberLimit
Optional. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
-
final
case class
ChatLocation(location: Location, address: String) extends Product with Serializable
Represents a location to which a chat is connected.
Represents a location to which a chat is connected.
- location
The location to which the supergroup is connected. Can't be a live location.
- address
Location address; 1-64 characters, as defined by the chat owner
- sealed trait ChatMember extends AnyRef
-
final
case class
ChatMemberAdministrator(status: String, user: User, canBeEdited: Boolean, isAnonymous: Boolean, canManageChat: Boolean, canDeleteMessages: Boolean, canManageVoiceChats: Boolean, canRestrictMembers: Boolean, canPromoteMembers: Boolean, canChangeInfo: Boolean, canInviteUsers: Boolean, canPostMessages: Option[Boolean] = Option.empty, canEditMessages: Option[Boolean] = Option.empty, canPinMessages: Option[Boolean] = Option.empty, customTitle: Option[String] = Option.empty) extends ChatMember with Product with Serializable
Represents a chat member that has some additional privileges.
Represents a chat member that has some additional privileges.
- status
The member's status in the chat, always “administrator”
- user
Information about the user
- canBeEdited
True, if the bot is allowed to edit administrator privileges of that user
- isAnonymous
True, if the user's presence in the chat is hidden
- canManageChat
True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
- canDeleteMessages
True, if the administrator can delete messages of other users
- canManageVoiceChats
True, if the administrator can manage voice chats
- canRestrictMembers
True, if the administrator can restrict, ban or unban chat members
- canPromoteMembers
True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
- canChangeInfo
True, if the user is allowed to change the chat title, photo and other settings
- canInviteUsers
True, if the user is allowed to invite new users to the chat
- canPostMessages
Optional. True, if the administrator can post in the channel; channels only
- canEditMessages
Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
- canPinMessages
Optional. True, if the user is allowed to pin messages; groups and supergroups only
- customTitle
Optional. Custom title for this user
-
final
case class
ChatMemberBanned(status: String, user: User, untilDate: Int) extends ChatMember with Product with Serializable
Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
- status
The member's status in the chat, always “kicked”
- user
Information about the user
- untilDate
Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever
-
final
case class
ChatMemberLeft(status: String, user: User) extends ChatMember with Product with Serializable
Represents a chat member that isn't currently a member of the chat, but may join it themselves.
Represents a chat member that isn't currently a member of the chat, but may join it themselves.
- status
The member's status in the chat, always “left”
- user
Information about the user
-
final
case class
ChatMemberMember(status: String, user: User) extends ChatMember with Product with Serializable
Represents a chat member that has no additional privileges or restrictions.
Represents a chat member that has no additional privileges or restrictions.
- status
The member's status in the chat, always “member”
- user
Information about the user
-
final
case class
ChatMemberOwner(status: String, user: User, isAnonymous: Boolean, customTitle: Option[String] = Option.empty) extends ChatMember with Product with Serializable
Represents a chat member that owns the chat and has all administrator privileges.
Represents a chat member that owns the chat and has all administrator privileges.
- status
The member's status in the chat, always “creator”
- user
Information about the user
- isAnonymous
True, if the user's presence in the chat is hidden
- customTitle
Optional. Custom title for this user
-
final
case class
ChatMemberRestricted(status: String, user: User, isMember: Boolean, canChangeInfo: Boolean, canInviteUsers: Boolean, canPinMessages: Boolean, canSendMessages: Boolean, canSendMediaMessages: Boolean, canSendPolls: Boolean, canSendOtherMessages: Boolean, canAddWebPagePreviews: Boolean, untilDate: Int) extends ChatMember with Product with Serializable
Represents a chat member that is under certain restrictions in the chat.
Represents a chat member that is under certain restrictions in the chat. Supergroups only.
- status
The member's status in the chat, always “restricted”
- user
Information about the user
- isMember
True, if the user is a member of the chat at the moment of the request
- canChangeInfo
True, if the user is allowed to change the chat title, photo and other settings
- canInviteUsers
True, if the user is allowed to invite new users to the chat
- canPinMessages
True, if the user is allowed to pin messages
- canSendMessages
True, if the user is allowed to send text messages, contacts, locations and venues
- canSendMediaMessages
True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes
- canSendPolls
True, if the user is allowed to send polls
- canSendOtherMessages
True, if the user is allowed to send animations, games, stickers and use inline bots
- canAddWebPagePreviews
True, if the user is allowed to add web page previews to their messages
- untilDate
Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever
-
final
case class
ChatMemberUpdated(chat: Chat, from: User, date: Int, oldChatMember: ChatMember, newChatMember: ChatMember, inviteLink: Option[ChatInviteLink] = Option.empty) extends Product with Serializable
This object represents changes in the status of a chat member.
This object represents changes in the status of a chat member.
- chat
Chat the user belongs to
- from
Performer of the action, which resulted in the change
- date
Date the change was done in Unix time
- oldChatMember
Previous information about the chat member
- newChatMember
New information about the chat member
- inviteLink
Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.
-
final
case class
ChatPermissions(canSendMessages: Option[Boolean] = Option.empty, canSendMediaMessages: Option[Boolean] = Option.empty, canSendPolls: Option[Boolean] = Option.empty, canSendOtherMessages: Option[Boolean] = Option.empty, canAddWebPagePreviews: Option[Boolean] = Option.empty, canChangeInfo: Option[Boolean] = Option.empty, canInviteUsers: Option[Boolean] = Option.empty, canPinMessages: Option[Boolean] = Option.empty) extends Product with Serializable
Describes actions that a non-administrator user is allowed to take in a chat.
Describes actions that a non-administrator user is allowed to take in a chat.
- canSendMessages
Optional. True, if the user is allowed to send text messages, contacts, locations and venues
- canSendMediaMessages
Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
- canSendPolls
Optional. True, if the user is allowed to send polls, implies can_send_messages
- canSendOtherMessages
Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages
- canAddWebPagePreviews
Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages
- canChangeInfo
Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
- canInviteUsers
Optional. True, if the user is allowed to invite new users to the chat
- canPinMessages
Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
-
final
case class
ChatPhoto(smallFileId: String, smallFileUniqueId: String, bigFileId: String, bigFileUniqueId: String) extends Product with Serializable
This object represents a chat photo.
This object represents a chat photo.
- smallFileId
File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
- smallFileUniqueId
Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- bigFileId
File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
- bigFileUniqueId
Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- final case class ChatStrId(id: String) extends ChatId with Product with Serializable
-
final
case class
ChosenInlineResult(resultId: String, from: User, location: Option[Location] = Option.empty, inlineMessageId: Option[String] = Option.empty, query: String) extends Product with Serializable
Represents a result of an inline query that was chosen by the user and sent to their chat partner.
Represents a result of an inline query that was chosen by the user and sent to their chat partner.
- resultId
The unique identifier for the result that was chosen
- from
The user that chose the result
- location
Optional. Sender location, only for bots that require user location
- inlineMessageId
Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
- query
The query that was used to obtain the result
-
final
case class
CodeMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
code
code
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
Contact(phoneNumber: String, firstName: String, lastName: Option[String] = Option.empty, userId: Option[Long] = Option.empty, vcard: Option[String] = Option.empty) extends Product with Serializable
This object represents a phone contact.
This object represents a phone contact.
- phoneNumber
Contact's phone number
- firstName
Contact's first name
- lastName
Optional. Contact's last name
- userId
Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
- vcard
Optional. Additional data about the contact in the form of a vCard
-
final
case class
Dice(emoji: Emoji, value: Int) extends Product with Serializable
This object represents an animated emoji that displays a random value.
This object represents an animated emoji that displays a random value.
- emoji
Emoji on which the dice throw animation is based
- value
Value of the dice, 1-6 for EmojiDice, EmojiDarts and EmojiBowling base emoji, 1-5 for EmojiBasketball and EmojiFootball base emoji, 1-64 for EmojiSlotMachine base emoji
-
final
case class
Document(fileId: String, fileUniqueId: String, thumb: Option[PhotoSize] = Option.empty, fileName: Option[String] = Option.empty, mimeType: Option[String] = Option.empty, fileSize: Option[Int] = Option.empty) extends Product with Serializable
This object represents a general file (as opposed to photos, voice messages and audio files).
This object represents a general file (as opposed to photos, voice messages and audio files).
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- thumb
Optional. Document thumbnail as defined by sender
- fileName
Optional. Original filename as defined by sender
- mimeType
Optional. MIME type of the file as defined by sender
- fileSize
Optional. File size
-
final
case class
EmailMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
email
email
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
- sealed trait Emoji extends AnyRef
-
final
case class
EncryptedCredentials(data: String, hash: String, secret: String) extends Product with Serializable
Contains data required for decrypting and authenticating EncryptedPassportElement.
Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
- data
Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication
- hash
Base64-encoded data hash for data authentication
- secret
Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption
-
final
case class
EncryptedPassportElement(type: String, data: Option[String] = Option.empty, phoneNumber: Option[String] = Option.empty, email: Option[String] = Option.empty, files: List[PassportFile] = List.empty, frontSide: Option[PassportFile] = Option.empty, reverseSide: Option[PassportFile] = Option.empty, selfie: Option[PassportFile] = Option.empty, translation: List[PassportFile] = List.empty, hash: String) extends Product with Serializable
Contains information about documents or other Telegram Passport elements shared with the bot by the user.
Contains information about documents or other Telegram Passport elements shared with the bot by the user.
- type
Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.
- data
Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.
- phoneNumber
Optional. User's verified phone number, available only for “phone_number” type
Optional. User's verified email address, available only for “email” type
- files
Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
- frontSide
Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
- reverseSide
Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
- selfie
Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
- translation
Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
- hash
Base64-encoded element hash for using in PassportElementErrorUnspecified
-
final
case class
File(fileId: String, fileUniqueId: String, fileSize: Option[Int] = Option.empty, filePath: Option[String] = Option.empty) extends Product with Serializable
This object represents a file ready to be downloaded.
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.
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- fileSize
Optional. File size, if known
- filePath
Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
-
final
case class
ForceReply(forceReply: Boolean, inputFieldPlaceholder: Option[String] = Option.empty, selective: Option[Boolean] = Option.empty) extends KeyboardMarkup with Product with Serializable
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').
Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
- forceReply
Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'
- inputFieldPlaceholder
Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
- selective
Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
-
final
case class
Game(title: String, description: String, photo: List[PhotoSize] = List.empty, text: Option[String] = Option.empty, textEntities: List[MessageEntity] = List.empty, animation: Option[Animation] = Option.empty) extends Product with Serializable
This object represents a game.
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
- title
Title of the game
- description
Description of the game
- photo
Photo that will be displayed in the game message in chats.
- text
Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
- textEntities
Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
- animation
Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
-
final
case class
GameHighScore(position: Int, user: User, score: Int) extends Product with Serializable
This object represents one row of the high scores table for a game.
This object represents one row of the high scores table for a game.
- position
Position in high score table for the game
- user
User
- score
Score
-
final
case class
HashtagMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
hashtag
hashtag
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
- sealed trait IFile extends AnyRef
-
final
case class
InlineKeyboardButton(text: String, url: Option[String] = Option.empty, loginUrl: Option[LoginUrl] = Option.empty, callbackData: Option[String] = Option.empty, switchInlineQuery: Option[String] = Option.empty, switchInlineQueryCurrentChat: Option[String] = Option.empty, callbackGame: Option[CallbackGame.type] = Option.empty, pay: Option[Boolean] = Option.empty) extends Product with Serializable
This object represents one button of an inline keyboard.
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
- text
Label text on the button
- url
Optional. HTTP or tg:// url to be opened when button is pressed
- loginUrl
Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
- callbackData
Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
- switchInlineQuery
Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted. Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.
- switchInlineQueryCurrentChat
Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options.
- callbackGame
Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row.
- pay
Optional. Specify True, to send a Pay button. NOTE: This type of button must always be the first button in the first row.
-
final
case class
InlineKeyboardMarkup(inlineKeyboard: List[List[InlineKeyboardButton]] = List.empty) extends KeyboardMarkup with Product with Serializable
This object represents an inline keyboard that appears right next to the message it belongs to.
This object represents an inline keyboard that appears right next to the message it belongs to.
- inlineKeyboard
Array of button rows, each represented by an Array of InlineKeyboardButton objects
-
final
case class
InlineQuery(id: String, from: User, query: String, offset: String, chatType: Option[String] = Option.empty, location: Option[Location] = Option.empty) extends Product with Serializable
This object represents an incoming inline query.
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
- id
Unique identifier for this query
- from
Sender
- query
Text of the query (up to 256 characters)
- offset
Offset of the results to be returned, can be controlled by the bot
- chatType
Optional. Type of the chat, from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat
- location
Optional. Sender location, only for bots that request user location
- sealed trait InlineQueryResult extends AnyRef
-
final
case class
InlineQueryResultArticle(id: String, title: String, inputMessageContent: InputMessageContent, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, url: Option[String] = Option.empty, hideUrl: Option[Boolean] = Option.empty, description: Option[String] = Option.empty, thumbUrl: Option[String] = Option.empty, thumbWidth: Option[Int] = Option.empty, thumbHeight: Option[Int] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to an article or web page.
Represents a link to an article or web page.
- id
Unique identifier for this result, 1-64 Bytes
- title
Title of the result
- inputMessageContent
Content of the message to be sent
- replyMarkup
Optional. Inline keyboard attached to the message
- url
Optional. URL of the result
- hideUrl
Optional. Pass True, if you don't want the URL to be shown in the message
- description
Optional. Short description of the result
- thumbUrl
Optional. Url of the thumbnail for the result
- thumbWidth
Optional. Thumbnail width
- thumbHeight
Optional. Thumbnail height
-
final
case class
InlineQueryResultAudio(id: String, audioUrl: String, title: String, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, performer: Option[String] = Option.empty, audioDuration: Option[Int] = Option.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to an MP3 audio file.
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.
- id
Unique identifier for this result, 1-64 bytes
- audioUrl
A valid URL for the audio file
- title
Title
- caption
Optional. Caption, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- performer
Optional. Performer
- audioDuration
Optional. Audio duration in seconds
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the audio
-
final
case class
InlineQueryResultCachedAudio(id: String, audioFileId: String, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to an MP3 audio file stored on the Telegram servers.
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.
- id
Unique identifier for this result, 1-64 bytes
- audioFileId
A valid file identifier for the audio file
- caption
Optional. Caption, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the audio
-
final
case class
InlineQueryResultCachedDocument(id: String, title: String, documentFileId: String, description: Option[String] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a file stored on the Telegram servers.
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.
- id
Unique identifier for this result, 1-64 bytes
- title
Title for the result
- documentFileId
A valid file identifier for the file
- description
Optional. Short description of the result
- caption
Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the document caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the file
-
final
case class
InlineQueryResultCachedGif(id: String, gifFileId: String, title: Option[String] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to an animated GIF file stored on the Telegram servers.
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.
- id
Unique identifier for this result, 1-64 bytes
- gifFileId
A valid file identifier for the GIF file
- title
Optional. Title for the result
- caption
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the GIF animation
-
final
case class
InlineQueryResultCachedMpeg4Gif(id: String, mpeg4FileId: String, title: Option[String] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers.
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.
- id
Unique identifier for this result, 1-64 bytes
- mpeg4FileId
A valid file identifier for the MP4 file
- title
Optional. Title for the result
- caption
Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the video animation
-
final
case class
InlineQueryResultCachedPhoto(id: String, photoFileId: String, title: Option[String] = Option.empty, description: Option[String] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a photo stored on the Telegram servers.
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.
- id
Unique identifier for this result, 1-64 bytes
- photoFileId
A valid file identifier of the photo
- title
Optional. Title for the result
- description
Optional. Short description of the result
- caption
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the photo
-
final
case class
InlineQueryResultCachedSticker(id: String, stickerFileId: String, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a sticker stored on the Telegram servers.
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.
- id
Unique identifier for this result, 1-64 bytes
- stickerFileId
A valid file identifier of the sticker
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the sticker
-
final
case class
InlineQueryResultCachedVideo(id: String, videoFileId: String, title: String, description: Option[String] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a video file stored on the Telegram servers.
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.
- id
Unique identifier for this result, 1-64 bytes
- videoFileId
A valid file identifier for the video file
- title
Title for the result
- description
Optional. Short description of the result
- caption
Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the video caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the video
-
final
case class
InlineQueryResultCachedVoice(id: String, voiceFileId: String, title: String, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a voice message stored on the Telegram servers.
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.
- id
Unique identifier for this result, 1-64 bytes
- voiceFileId
A valid file identifier for the voice message
- title
Voice message title
- caption
Optional. Caption, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the voice message
-
final
case class
InlineQueryResultContact(id: String, phoneNumber: String, firstName: String, lastName: Option[String] = Option.empty, vcard: Option[String] = Option.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty, thumbUrl: Option[String] = Option.empty, thumbWidth: Option[Int] = Option.empty, thumbHeight: Option[Int] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a contact with a phone number.
Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
- id
Unique identifier for this result, 1-64 Bytes
- phoneNumber
Contact's phone number
- firstName
Contact's first name
- lastName
Optional. Contact's last name
- vcard
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the contact
- thumbUrl
Optional. Url of the thumbnail for the result
- thumbWidth
Optional. Thumbnail width
- thumbHeight
Optional. Thumbnail height
-
final
case class
InlineQueryResultDocument(id: String, title: String, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, documentUrl: String, mimeType: String, description: Option[String] = Option.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty, thumbUrl: Option[String] = Option.empty, thumbWidth: Option[Int] = Option.empty, thumbHeight: Option[Int] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a file.
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.
- id
Unique identifier for this result, 1-64 bytes
- title
Title for the result
- caption
Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the document caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- documentUrl
A valid URL for the file
- mimeType
Mime type of the content of the file, either “application/pdf” or “application/zip”
- description
Optional. Short description of the result
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the file
- thumbUrl
Optional. URL of the thumbnail (jpeg only) for the file
- thumbWidth
Optional. Thumbnail width
- thumbHeight
Optional. Thumbnail height
-
final
case class
InlineQueryResultGame(id: String, gameShortName: String, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a Game.
Represents a Game.
- id
Unique identifier for this result, 1-64 bytes
- gameShortName
Short name of the game
- replyMarkup
Optional. Inline keyboard attached to the message
-
final
case class
InlineQueryResultGif(id: String, gifUrl: String, gifWidth: Option[Int] = Option.empty, gifHeight: Option[Int] = Option.empty, gifDuration: Option[Int] = Option.empty, thumbUrl: String, thumbMimeType: Option[String] = Option.empty, title: Option[String] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to an animated GIF file.
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 use input_message_content to send a message with the specified content instead of the animation.
- id
Unique identifier for this result, 1-64 bytes
- gifUrl
A valid URL for the GIF file. File size must not exceed 1MB
- gifWidth
Optional. Width of the GIF
- gifHeight
Optional. Height of the GIF
- gifDuration
Optional. Duration of the GIF
- thumbUrl
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
- thumbMimeType
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
- title
Optional. Title for the result
- caption
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the GIF animation
-
final
case class
InlineQueryResultLocation(id: String, latitude: Float, longitude: Float, title: String, horizontalAccuracy: Option[Float] = Option.empty, livePeriod: Option[Int] = Option.empty, heading: Option[Int] = Option.empty, proximityAlertRadius: Option[Int] = Option.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty, thumbUrl: Option[String] = Option.empty, thumbWidth: Option[Int] = Option.empty, thumbHeight: Option[Int] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a location on a map.
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.
- id
Unique identifier for this result, 1-64 Bytes
- latitude
Location latitude in degrees
- longitude
Location longitude in degrees
- title
Location title
- horizontalAccuracy
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
- livePeriod
Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
- heading
Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
- proximityAlertRadius
Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the location
- thumbUrl
Optional. Url of the thumbnail for the result
- thumbWidth
Optional. Thumbnail width
- thumbHeight
Optional. Thumbnail height
-
final
case class
InlineQueryResultMpeg4Gif(id: String, mpeg4Url: String, mpeg4Width: Option[Int] = Option.empty, mpeg4Height: Option[Int] = Option.empty, mpeg4Duration: Option[Int] = Option.empty, thumbUrl: String, thumbMimeType: Option[String] = Option.empty, title: Option[String] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound).
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 use input_message_content to send a message with the specified content instead of the animation.
- id
Unique identifier for this result, 1-64 bytes
- mpeg4Url
A valid URL for the MP4 file. File size must not exceed 1MB
- mpeg4Width
Optional. Video width
- mpeg4Height
Optional. Video height
- mpeg4Duration
Optional. Video duration
- thumbUrl
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
- thumbMimeType
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
- title
Optional. Title for the result
- caption
Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the video animation
-
final
case class
InlineQueryResultPhoto(id: String, photoUrl: String, thumbUrl: String, photoWidth: Option[Int] = Option.empty, photoHeight: Option[Int] = Option.empty, title: Option[String] = Option.empty, description: Option[String] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a photo.
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.
- id
Unique identifier for this result, 1-64 bytes
- photoUrl
A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB
- thumbUrl
URL of the thumbnail for the photo
- photoWidth
Optional. Width of the photo
- photoHeight
Optional. Height of the photo
- title
Optional. Title for the result
- description
Optional. Short description of the result
- caption
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the photo
-
final
case class
InlineQueryResultVenue(id: String, latitude: Float, longitude: Float, title: String, address: String, foursquareId: Option[String] = Option.empty, foursquareType: Option[String] = Option.empty, googlePlaceId: Option[String] = Option.empty, googlePlaceType: Option[String] = Option.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty, thumbUrl: Option[String] = Option.empty, thumbWidth: Option[Int] = Option.empty, thumbHeight: Option[Int] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a venue.
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.
- id
Unique identifier for this result, 1-64 Bytes
- latitude
Latitude of the venue location in degrees
- longitude
Longitude of the venue location in degrees
- title
Title of the venue
- address
Address of the venue
- foursquareId
Optional. Foursquare identifier of the venue if known
- foursquareType
Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
- googlePlaceId
Optional. Google Places identifier of the venue
- googlePlaceType
Optional. Google Places type of the venue. (See supported types.)
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the venue
- thumbUrl
Optional. Url of the thumbnail for the result
- thumbWidth
Optional. Thumbnail width
- thumbHeight
Optional. Thumbnail height
-
final
case class
InlineQueryResultVideo(id: String, videoUrl: String, mimeType: String, thumbUrl: String, title: String, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, videoWidth: Option[Int] = Option.empty, videoHeight: Option[Int] = Option.empty, videoDuration: Option[Int] = Option.empty, description: Option[String] = Option.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a page containing an embedded video player or a video file.
Represents a link to a page containing an embedded video player or a video file. 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.
- id
Unique identifier for this result, 1-64 bytes
- videoUrl
A valid URL for the embedded video player or video file
- mimeType
Mime type of the content of video url, “text/html” or “video/mp4”
- thumbUrl
URL of the thumbnail (jpeg only) for the video
- title
Title for the result
- caption
Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the video caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- videoWidth
Optional. Video width
- videoHeight
Optional. Video height
- videoDuration
Optional. Video duration in seconds
- description
Optional. Short description of the result
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
-
final
case class
InlineQueryResultVoice(id: String, voiceUrl: String, title: String, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, voiceDuration: Option[Int] = Option.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty, inputMessageContent: Option[InputMessageContent] = Option.empty) extends InlineQueryResult with Product with Serializable
Represents a link to a voice recording in an .OGG container encoded with OPUS.
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.
- id
Unique identifier for this result, 1-64 bytes
- voiceUrl
A valid URL for the voice recording
- title
Recording title
- caption
Optional. Caption, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- voiceDuration
Optional. Recording duration in seconds
- replyMarkup
Optional. Inline keyboard attached to the message
- inputMessageContent
Optional. Content of the message to be sent instead of the voice recording
-
final
case class
InputContactMessageContent(phoneNumber: String, firstName: String, lastName: Option[String] = Option.empty, vcard: Option[String] = Option.empty) extends InputMessageContent with Product with Serializable
Represents the content of a contact message to be sent as the result of an inline query.
Represents the content of a contact message to be sent as the result of an inline query.
- phoneNumber
Contact's phone number
- firstName
Contact's first name
- lastName
Optional. Contact's last name
- vcard
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
-
final
case class
InputInvoiceMessageContent(title: String, description: String, payload: String, providerToken: String, currency: String, prices: List[LabeledPrice] = List.empty, maxTipAmount: Option[Int] = Option.empty, suggestedTipAmounts: List[Int] = List.empty, providerData: Option[String] = Option.empty, photoUrl: Option[String] = Option.empty, photoSize: Option[Int] = Option.empty, photoWidth: Option[Int] = Option.empty, photoHeight: Option[Int] = Option.empty, needName: Option[Boolean] = Option.empty, needPhoneNumber: Option[Boolean] = Option.empty, needEmail: Option[Boolean] = Option.empty, needShippingAddress: Option[Boolean] = Option.empty, sendPhoneNumberToProvider: Option[Boolean] = Option.empty, sendEmailToProvider: Option[Boolean] = Option.empty, isFlexible: Option[Boolean] = Option.empty) extends InputMessageContent with Product with Serializable
Represents the content of an invoice message to be sent as the result of an inline query.
Represents the content of an invoice message to be sent as the result of an inline query.
- title
Product name, 1-32 characters
- description
Product description, 1-255 characters
- payload
Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
- providerToken
Payment provider token, obtained via Botfather
- currency
Three-letter ISO 4217 currency code, see more on currencies
- prices
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
- maxTipAmount
Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0
- suggestedTipAmounts
Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
- providerData
Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.
- photoUrl
Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
- photoSize
Optional. Photo size
- photoWidth
Optional. Photo width
- photoHeight
Optional. Photo height
- needName
Optional. Pass True, if you require the user's full name to complete the order
- needPhoneNumber
Optional. Pass True, if you require the user's phone number to complete the order
- needEmail
Optional. Pass True, if you require the user's email address to complete the order
- needShippingAddress
Optional. Pass True, if you require the user's shipping address to complete the order
- sendPhoneNumberToProvider
Optional. Pass True, if user's phone number should be sent to provider
- sendEmailToProvider
Optional. Pass True, if user's email address should be sent to provider
- isFlexible
Optional. Pass True, if the final price depends on the shipping method
- final case class InputLinkFile(file: String) extends IFile with Product with Serializable
-
final
case class
InputLocationMessageContent(latitude: Float, longitude: Float, horizontalAccuracy: Option[Float] = Option.empty, livePeriod: Option[Int] = Option.empty, heading: Option[Int] = Option.empty, proximityAlertRadius: Option[Int] = Option.empty) extends InputMessageContent with Product with Serializable
Represents the content of a location message to be sent as the result of an inline query.
Represents the content of a location message to be sent as the result of an inline query.
- latitude
Latitude of the location in degrees
- longitude
Longitude of the location in degrees
- horizontalAccuracy
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
- livePeriod
Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
- heading
Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
- proximityAlertRadius
Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
- sealed trait InputMedia extends AnyRef
-
final
case class
InputMediaAnimation(media: String, thumb: Option[IFile] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, width: Option[Int] = Option.empty, height: Option[Int] = Option.empty, duration: Option[Int] = Option.empty) extends InputMedia with Product with Serializable
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
- media
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
- thumb
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
- caption
Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the animation caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- width
Optional. Animation width
- height
Optional. Animation height
- duration
Optional. Animation duration
-
final
case class
InputMediaAudio(media: String, thumb: Option[IFile] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, duration: Option[Int] = Option.empty, performer: Option[String] = Option.empty, title: Option[String] = Option.empty) extends InputMedia with Product with Serializable
Represents an audio file to be treated as music to be sent.
Represents an audio file to be treated as music to be sent.
- media
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
- thumb
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
- caption
Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- duration
Optional. Duration of the audio in seconds
- performer
Optional. Performer of the audio
- title
Optional. Title of the audio
-
final
case class
InputMediaDocument(media: String, thumb: Option[IFile] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, disableContentTypeDetection: Option[Boolean] = Option.empty) extends InputMedia with Product with Serializable
Represents a general file to be sent.
Represents a general file to be sent.
- media
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
- thumb
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
- caption
Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the document caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- disableContentTypeDetection
Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album.
-
final
case class
InputMediaPhoto(media: String, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty) extends InputMedia with Product with Serializable
Represents a photo to be sent.
Represents a photo to be sent.
- media
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
- caption
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
-
final
case class
InputMediaVideo(media: String, thumb: Option[IFile] = Option.empty, caption: Option[String] = Option.empty, parseMode: Option[ParseMode] = Option.empty, captionEntities: List[MessageEntity] = List.empty, width: Option[Int] = Option.empty, height: Option[Int] = Option.empty, duration: Option[Int] = Option.empty, supportsStreaming: Option[Boolean] = Option.empty) extends InputMedia with Product with Serializable
Represents a video to be sent.
Represents a video to be sent.
- media
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
- thumb
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
- caption
Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
- parseMode
Optional. Mode for parsing entities in the video caption. See formatting options for more details.
- captionEntities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- width
Optional. Video width
- height
Optional. Video height
- duration
Optional. Video duration
- supportsStreaming
Optional. Pass True, if the uploaded video is suitable for streaming
- sealed trait InputMessageContent extends AnyRef
- final case class InputPartFile(file: java.io.File) extends IFile with Product with Serializable
-
final
case class
InputTextMessageContent(messageText: String, parseMode: Option[ParseMode] = Option.empty, entities: List[MessageEntity] = List.empty, disableWebPagePreview: Option[Boolean] = Option.empty) extends InputMessageContent with Product with Serializable
Represents the content of a text message to be sent as the result of an inline query.
Represents the content of a text message to be sent as the result of an inline query.
- messageText
Text of the message to be sent, 1-4096 characters
- parseMode
Optional. Mode for parsing entities in the message text. See formatting options for more details.
- entities
Optional. List of special entities that appear in message text, which can be specified instead of parse_mode
- disableWebPagePreview
Optional. Disables link previews for links in the sent message
-
final
case class
InputVenueMessageContent(latitude: Float, longitude: Float, title: String, address: String, foursquareId: Option[String] = Option.empty, foursquareType: Option[String] = Option.empty, googlePlaceId: Option[String] = Option.empty, googlePlaceType: Option[String] = Option.empty) extends InputMessageContent with Product with Serializable
Represents the content of a venue message to be sent as the result of an inline query.
Represents the content of a venue message to be sent as the result of an inline query.
- latitude
Latitude of the venue in degrees
- longitude
Longitude of the venue in degrees
- title
Name of the venue
- address
Address of the venue
- foursquareId
Optional. Foursquare identifier of the venue, if known
- foursquareType
Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
- googlePlaceId
Optional. Google Places identifier of the venue
- googlePlaceType
Optional. Google Places type of the venue. (See supported types.)
-
final
case class
Invoice(title: String, description: String, startParameter: String, currency: String, totalAmount: Int) extends Product with Serializable
This object contains basic information about an invoice.
This object contains basic information about an invoice.
- title
Product name
- description
Product description
- startParameter
Unique bot deep-linking parameter that can be used to generate this invoice
- currency
Three-letter ISO 4217 currency code
- totalAmount
Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
-
final
case class
ItalicMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
italic
italic
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
KeyboardButton(text: String, requestContact: Option[Boolean] = Option.empty, requestLocation: Option[Boolean] = Option.empty, requestPoll: Option[KeyboardButtonPollType] = Option.empty) extends Product with Serializable
This object represents one button of the reply keyboard.
This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.
- text
Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed
- requestContact
Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
- requestLocation
Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
- requestPoll
Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only
-
final
case class
KeyboardButtonPollType(type: Option[String] = Option.empty) extends Product with Serializable
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
- type
Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.
- sealed trait KeyboardMarkup extends AnyRef
-
final
case class
LabeledPrice(label: String, amount: Int) extends Product with Serializable
This object represents a portion of the price for goods or services.
This object represents a portion of the price for goods or services.
- label
Portion label
- amount
Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
-
final
case class
Location(longitude: Float, latitude: Float, horizontalAccuracy: Option[Float] = Option.empty, livePeriod: Option[Int] = Option.empty, heading: Option[Int] = Option.empty, proximityAlertRadius: Option[Int] = Option.empty) extends Product with Serializable
This object represents a point on the map.
This object represents a point on the map.
- longitude
Longitude as defined by sender
- latitude
Latitude as defined by sender
- horizontalAccuracy
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
- livePeriod
Optional. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only.
- heading
Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
- proximityAlertRadius
Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
-
final
case class
LoginUrl(url: String, forwardText: Option[String] = Option.empty, botUsername: Option[String] = Option.empty, requestWriteAccess: Option[Boolean] = Option.empty) extends Product with Serializable
This object represents a parameter of the inline keyboard button used to automatically authorize a user.
This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
- url
An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
- forwardText
Optional. New text of the button in forwarded messages.
- botUsername
Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.
- requestWriteAccess
Optional. Pass True to request the permission for your bot to send messages to the user.
-
final
case class
MaskPosition(point: String, xShift: Float, yShift: Float, scale: Float) extends Product with Serializable
This object describes the position on faces where a mask should be placed by default.
This object describes the position on faces where a mask should be placed by default.
- point
The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.
- xShift
Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.
- yShift
Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.
- scale
Mask scaling coefficient. For example, 2.0 means double size.
-
final
case class
MentionMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
mention
mention
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
Message(messageId: Int, from: Option[User] = Option.empty, senderChat: Option[Chat] = Option.empty, date: Int, chat: Chat, forwardFrom: Option[User] = Option.empty, forwardFromChat: Option[Chat] = Option.empty, forwardFromMessageId: Option[Int] = Option.empty, forwardSignature: Option[String] = Option.empty, forwardSenderName: Option[String] = Option.empty, forwardDate: Option[Int] = Option.empty, replyToMessage: Option[Message] = Option.empty, viaBot: Option[User] = Option.empty, editDate: Option[Int] = Option.empty, mediaGroupId: Option[String] = Option.empty, authorSignature: Option[String] = Option.empty, text: Option[String] = Option.empty, entities: List[MessageEntity] = List.empty, animation: Option[Animation] = Option.empty, audio: Option[Audio] = Option.empty, document: Option[Document] = Option.empty, photo: List[PhotoSize] = List.empty, sticker: Option[Sticker] = Option.empty, video: Option[Video] = Option.empty, videoNote: Option[VideoNote] = Option.empty, voice: Option[Voice] = Option.empty, caption: Option[String] = Option.empty, captionEntities: List[MessageEntity] = List.empty, contact: Option[Contact] = Option.empty, dice: Option[Dice] = Option.empty, game: Option[Game] = Option.empty, poll: Option[Poll] = Option.empty, venue: Option[Venue] = Option.empty, location: Option[Location] = Option.empty, newChatMembers: List[User] = List.empty, leftChatMember: Option[User] = Option.empty, newChatTitle: Option[String] = Option.empty, newChatPhoto: List[PhotoSize] = List.empty, deleteChatPhoto: Option[Boolean] = Option.empty, groupChatCreated: Option[Boolean] = Option.empty, supergroupChatCreated: Option[Boolean] = Option.empty, channelChatCreated: Option[Boolean] = Option.empty, messageAutoDeleteTimerChanged: Option[MessageAutoDeleteTimerChanged] = Option.empty, migrateToChatId: Option[Long] = Option.empty, migrateFromChatId: Option[Long] = Option.empty, pinnedMessage: Option[Message] = Option.empty, invoice: Option[Invoice] = Option.empty, successfulPayment: Option[SuccessfulPayment] = Option.empty, connectedWebsite: Option[String] = Option.empty, passportData: Option[PassportData] = Option.empty, proximityAlertTriggered: Option[ProximityAlertTriggered] = Option.empty, voiceChatScheduled: Option[VoiceChatScheduled] = Option.empty, voiceChatStarted: Option[VoiceChatStarted.type] = Option.empty, voiceChatEnded: Option[VoiceChatEnded] = Option.empty, voiceChatParticipantsInvited: Option[VoiceChatParticipantsInvited] = Option.empty, replyMarkup: Option[InlineKeyboardMarkup] = Option.empty) extends Product with Serializable
This object represents a message.
This object represents a message.
- messageId
Unique message identifier inside this chat
- from
Optional. Sender, empty for messages sent to channels
- senderChat
Optional. Sender of the message, sent on behalf of a chat. The channel itself for channel messages. The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group
- date
Date the message was sent in Unix time
- chat
Conversation the message belongs to
- forwardFrom
Optional. For forwarded messages, sender of the original message
- forwardFromChat
Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat
- forwardFromMessageId
Optional. For messages forwarded from channels, identifier of the original message in the channel
- forwardSignature
Optional. For messages forwarded from channels, signature of the post author if present
- forwardSenderName
Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages
- forwardDate
Optional. For forwarded messages, date the original message was sent in Unix time
- replyToMessage
Optional. 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.
- viaBot
Optional. Bot through which the message was sent
- editDate
Optional. Date the message was last edited in Unix time
- mediaGroupId
Optional. The unique identifier of a media message group this message belongs to
- authorSignature
Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
- text
Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters
- entities
Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
- animation
Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
- audio
Optional. Message is an audio file, information about the file
- document
Optional. Message is a general file, information about the file
- photo
Optional. Message is a photo, available sizes of the photo
- sticker
Optional. Message is a sticker, information about the sticker
- video
Optional. Message is a video, information about the video
- videoNote
Optional. Message is a video note, information about the video message
- voice
Optional. Message is a voice message, information about the file
- caption
Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters
- captionEntities
Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
- contact
Optional. Message is a shared contact, information about the contact
- dice
Optional. Message is a dice with random value
- game
Optional. Message is a game, information about the game.
- poll
Optional. Message is a native poll, information about the poll
- venue
Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set
- location
Optional. Message is a shared location, information about the location
- newChatMembers
Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
- leftChatMember
Optional. A member was removed from the group, information about them (this member may be the bot itself)
- newChatTitle
Optional. A chat title was changed to this value
- newChatPhoto
Optional. A chat photo was change to this value
- deleteChatPhoto
Optional. Service message: the chat photo was deleted
- groupChatCreated
Optional. Service message: the group has been created
- supergroupChatCreated
Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
- channelChatCreated
Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
- messageAutoDeleteTimerChanged
Optional. Service message: auto-delete timer settings changed in the chat
- migrateToChatId
Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
- migrateFromChatId
Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
- pinnedMessage
Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
- invoice
Optional. Message is an invoice for a payment, information about the invoice.
- successfulPayment
Optional. Message is a service message about a successful payment, information about the payment.
- connectedWebsite
Optional. The domain name of the website on which the user has logged in.
- passportData
Optional. Telegram Passport data
- proximityAlertTriggered
Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.
- voiceChatScheduled
Optional. Service message: voice chat scheduled
- voiceChatStarted
Optional. Service message: voice chat started
- voiceChatEnded
Optional. Service message: voice chat ended
- voiceChatParticipantsInvited
Optional. Service message: new participants invited to a voice chat
- replyMarkup
Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
-
final
case class
MessageAutoDeleteTimerChanged(messageAutoDeleteTime: Int) extends Product with Serializable
This object represents a service message about a change in auto-delete timer settings.
This object represents a service message about a change in auto-delete timer settings.
- messageAutoDeleteTime
New auto-delete time for messages in the chat
- sealed trait MessageEntity extends AnyRef
-
final
case class
MessageId(messageId: Int) extends Product with Serializable
This object represents a unique message identifier.
This object represents a unique message identifier.
- messageId
Unique message identifier
-
final
case class
OrderInfo(name: Option[String] = Option.empty, phoneNumber: Option[String] = Option.empty, email: Option[String] = Option.empty, shippingAddress: Option[ShippingAddress] = Option.empty) extends Product with Serializable
This object represents information about an order.
This object represents information about an order.
- name
Optional. User name
- phoneNumber
Optional. User's phone number
Optional. User email
- shippingAddress
Optional. User shipping address
- sealed trait ParseMode extends AnyRef
-
final
case class
PassportData(data: List[EncryptedPassportElement] = List.empty, credentials: EncryptedCredentials) extends Product with Serializable
Contains information about Telegram Passport data shared with the bot by the user.
Contains information about Telegram Passport data shared with the bot by the user.
- data
Array with information about documents and other Telegram Passport elements that was shared with the bot
- credentials
Encrypted credentials required to decrypt the data
- sealed trait PassportElementError extends AnyRef
-
final
case class
PassportElementErrorDataField(type: String, fieldName: String, dataHash: String, message: String) extends PassportElementError with Product with Serializable
Represents an issue in one of the data fields that was provided by the user.
Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
- type
The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”
- fieldName
Name of the data field which has the error
- dataHash
Base64-encoded data hash
- message
Error message
-
final
case class
PassportElementErrorFile(type: String, fileHash: String, message: String) extends PassportElementError with Product with Serializable
Represents an issue with a document scan.
Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
- type
The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
- fileHash
Base64-encoded file hash
- message
Error message
-
final
case class
PassportElementErrorFiles(type: String, fileHashes: List[String] = List.empty, message: String) extends PassportElementError with Product with Serializable
Represents an issue with a list of scans.
Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
- type
The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
- fileHashes
List of base64-encoded file hashes
- message
Error message
-
final
case class
PassportElementErrorFrontSide(type: String, fileHash: String, message: String) extends PassportElementError with Product with Serializable
Represents an issue with the front side of a document.
Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
- type
The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”
- fileHash
Base64-encoded hash of the file with the front side of the document
- message
Error message
-
final
case class
PassportElementErrorReverseSide(type: String, fileHash: String, message: String) extends PassportElementError with Product with Serializable
Represents an issue with the reverse side of a document.
Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
- type
The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card”
- fileHash
Base64-encoded hash of the file with the reverse side of the document
- message
Error message
-
final
case class
PassportElementErrorSelfie(type: String, fileHash: String, message: String) extends PassportElementError with Product with Serializable
Represents an issue with the selfie with a document.
Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
- type
The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”
- fileHash
Base64-encoded hash of the file with the selfie
- message
Error message
-
final
case class
PassportElementErrorTranslationFile(type: String, fileHash: String, message: String) extends PassportElementError with Product with Serializable
Represents an issue with one of the files that constitute the translation of a document.
Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
- type
Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
- fileHash
Base64-encoded file hash
- message
Error message
-
final
case class
PassportElementErrorTranslationFiles(type: String, fileHashes: List[String] = List.empty, message: String) extends PassportElementError with Product with Serializable
Represents an issue with the translated version of a document.
Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
- type
Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
- fileHashes
List of base64-encoded file hashes
- message
Error message
-
final
case class
PassportElementErrorUnspecified(type: String, elementHash: String, message: String) extends PassportElementError with Product with Serializable
Represents an issue in an unspecified place.
Represents an issue in an unspecified place. The error is considered resolved when new data is added.
- type
Type of element of the user's Telegram Passport which has the issue
- elementHash
Base64-encoded element hash
- message
Error message
-
final
case class
PassportFile(fileId: String, fileUniqueId: String, fileSize: Int, fileDate: Int) extends Product with Serializable
This object represents a file uploaded to Telegram Passport.
This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- fileSize
File size
- fileDate
Unix time when the file was uploaded
-
final
case class
PhoneNumberMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
phone_number
phone_number
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
PhotoSize(fileId: String, fileUniqueId: String, width: Int, height: Int, fileSize: Option[Int] = Option.empty) extends Product with Serializable
This object represents one size of a photo or a file / sticker thumbnail.
This object represents one size of a photo or a file / sticker thumbnail.
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- width
Photo width
- height
Photo height
- fileSize
Optional. File size
-
final
case class
Poll(id: String, question: String, options: List[PollOption] = List.empty, totalVoterCount: Int, isClosed: Boolean, isAnonymous: Boolean, type: String, allowsMultipleAnswers: Boolean, correctOptionId: Option[Int] = Option.empty, explanation: Option[String] = Option.empty, explanationEntities: List[MessageEntity] = List.empty, openPeriod: Option[Int] = Option.empty, closeDate: Option[Int] = Option.empty) extends Product with Serializable
This object contains information about a poll.
This object contains information about a poll.
- id
Unique poll identifier
- question
Poll question, 1-300 characters
- options
List of poll options
- totalVoterCount
Total number of users that voted in the poll
- isClosed
True, if the poll is closed
- isAnonymous
True, if the poll is anonymous
- type
Poll type, currently can be “regular” or “quiz”
- allowsMultipleAnswers
True, if the poll allows multiple answers
- correctOptionId
Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
- explanation
Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters
- explanationEntities
Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
- openPeriod
Optional. Amount of time in seconds the poll will be active after creation
- closeDate
Optional. Point in time (Unix timestamp) when the poll will be automatically closed
-
final
case class
PollAnswer(pollId: String, user: User, optionIds: List[Int] = List.empty) extends Product with Serializable
This object represents an answer of a user in a non-anonymous poll.
This object represents an answer of a user in a non-anonymous poll.
- pollId
Unique poll identifier
- user
The user, who changed the answer to the poll
- optionIds
0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.
-
final
case class
PollOption(text: String, voterCount: Int) extends Product with Serializable
This object contains information about one answer option in a poll.
This object contains information about one answer option in a poll.
- text
Option text, 1-100 characters
- voterCount
Number of users that voted for this option
-
final
case class
PreCheckoutQuery(id: String, from: User, currency: String, totalAmount: Int, invoicePayload: String, shippingOptionId: Option[String] = Option.empty, orderInfo: Option[OrderInfo] = Option.empty) extends Product with Serializable
This object contains information about an incoming pre-checkout query.
This object contains information about an incoming pre-checkout query.
- id
Unique query identifier
- from
User who sent the query
- currency
Three-letter ISO 4217 currency code
- totalAmount
Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
- invoicePayload
Bot specified invoice payload
- shippingOptionId
Optional. Identifier of the shipping option chosen by the user
- orderInfo
Optional. Order info provided by the user
-
final
case class
PreMessageEntity(offset: Int, length: Int, language: Option[String] = Option.empty) extends MessageEntity with Product with Serializable
pre
pre
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
- language
Optional, the programming language of the entity text
-
final
case class
ProximityAlertTriggered(traveler: User, watcher: User, distance: Int) extends Product with Serializable
This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
- traveler
User that triggered the alert
- watcher
User that set the alert
- distance
The distance between the users
-
final
case class
ReplyKeyboardMarkup(keyboard: List[List[KeyboardButton]] = List.empty, resizeKeyboard: Option[Boolean] = Option.empty, oneTimeKeyboard: Option[Boolean] = Option.empty, inputFieldPlaceholder: Option[String] = Option.empty, selective: Option[Boolean] = Option.empty) extends KeyboardMarkup with Product with Serializable
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
- keyboard
Array of button rows, each represented by an Array of KeyboardButton objects
- resizeKeyboard
Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
- oneTimeKeyboard
Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false.
- inputFieldPlaceholder
Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters
- selective
Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
-
final
case class
ReplyKeyboardRemove(removeKeyboard: Boolean, selective: Option[Boolean] = Option.empty) extends KeyboardMarkup with Product with Serializable
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).
- removeKeyboard
Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)
- selective
Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.
-
final
case class
ResponseParameters(migrateToChatId: Option[Long] = Option.empty, retryAfter: Option[Int] = Option.empty) extends Product with Serializable
Contains information about why a request was unsuccessful.
Contains information about why a request was unsuccessful.
- migrateToChatId
Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
- retryAfter
Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated
-
final
case class
ShippingAddress(countryCode: String, state: String, city: String, streetLine1: String, streetLine2: String, postCode: String) extends Product with Serializable
This object represents a shipping address.
This object represents a shipping address.
- countryCode
ISO 3166-1 alpha-2 country code
- state
State, if applicable
- city
City
- streetLine1
First line for the address
- streetLine2
Second line for the address
- postCode
Address post code
-
final
case class
ShippingOption(id: String, title: String, prices: List[LabeledPrice] = List.empty) extends Product with Serializable
This object represents one shipping option.
This object represents one shipping option.
- id
Shipping option identifier
- title
Option title
- prices
List of price portions
-
final
case class
ShippingQuery(id: String, from: User, invoicePayload: String, shippingAddress: ShippingAddress) extends Product with Serializable
This object contains information about an incoming shipping query.
This object contains information about an incoming shipping query.
- id
Unique query identifier
- from
User who sent the query
- invoicePayload
Bot specified invoice payload
- shippingAddress
User specified shipping address
-
final
case class
Sticker(fileId: String, fileUniqueId: String, width: Int, height: Int, isAnimated: Boolean, thumb: Option[PhotoSize] = Option.empty, emoji: Option[Emoji] = Option.empty, setName: Option[String] = Option.empty, maskPosition: Option[MaskPosition] = Option.empty, fileSize: Option[Int] = Option.empty) extends Product with Serializable
This object represents a sticker.
This object represents a sticker.
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- width
Sticker width
- height
Sticker height
- isAnimated
True, if the sticker is animated
- thumb
Optional. Sticker thumbnail in the .WEBP or .JPG format
- emoji
Optional. Emoji associated with the sticker
- setName
Optional. Name of the sticker set to which the sticker belongs
- maskPosition
Optional. For mask stickers, the position where the mask should be placed
- fileSize
Optional. File size
-
final
case class
StickerSet(name: String, title: String, isAnimated: Boolean, containsMasks: Boolean, stickers: List[Sticker] = List.empty, thumb: Option[PhotoSize] = Option.empty) extends Product with Serializable
This object represents a sticker set.
This object represents a sticker set.
- name
Sticker set name
- title
Sticker set title
- isAnimated
True, if the sticker set contains animated stickers
- containsMasks
True, if the sticker set contains masks
- stickers
List of all set stickers
- thumb
Optional. Sticker set thumbnail in the .WEBP or .TGS format
-
final
case class
StrikethroughMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
strikethrough
strikethrough
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
SuccessfulPayment(currency: String, totalAmount: Int, invoicePayload: String, shippingOptionId: Option[String] = Option.empty, orderInfo: Option[OrderInfo] = Option.empty, telegramPaymentChargeId: String, providerPaymentChargeId: String) extends Product with Serializable
This object contains basic information about a successful payment.
This object contains basic information about a successful payment.
- currency
Three-letter ISO 4217 currency code
- totalAmount
Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
- invoicePayload
Bot specified invoice payload
- shippingOptionId
Optional. Identifier of the shipping option chosen by the user
- orderInfo
Optional. Order info provided by the user
- telegramPaymentChargeId
Telegram payment identifier
- providerPaymentChargeId
Provider payment identifier
-
final
case class
TextLinkMessageEntity(offset: Int, length: Int, url: String) extends MessageEntity with Product with Serializable
text_link
text_link
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
- url
url that will be opened after user taps on the text
-
final
case class
TextMentionMessageEntity(offset: Int, length: Int, user: User) extends MessageEntity with Product with Serializable
text_mention
text_mention
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
- user
the mentioned user
-
final
case class
UnderlineMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
underline
underline
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
Update(updateId: Int, message: Option[Message] = Option.empty, editedMessage: Option[Message] = Option.empty, channelPost: Option[Message] = Option.empty, editedChannelPost: Option[Message] = Option.empty, inlineQuery: Option[InlineQuery] = Option.empty, chosenInlineResult: Option[ChosenInlineResult] = Option.empty, callbackQuery: Option[CallbackQuery] = Option.empty, shippingQuery: Option[ShippingQuery] = Option.empty, preCheckoutQuery: Option[PreCheckoutQuery] = Option.empty, poll: Option[Poll] = Option.empty, pollAnswer: Option[PollAnswer] = Option.empty, myChatMember: Option[ChatMemberUpdated] = Option.empty, chatMember: Option[ChatMemberUpdated] = Option.empty) extends Product with Serializable
This object represents an incoming update.
This object represents an incoming update. At most one of the optional parameters can be present in any given update.
- updateId
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
- message
Optional. New incoming message of any kind — text, photo, sticker, etc.
- editedMessage
Optional. New version of a message that is known to the bot and was edited
- channelPost
Optional. New incoming channel post of any kind — text, photo, sticker, etc.
- editedChannelPost
Optional. New version of a channel post that is known to the bot and was edited
- inlineQuery
Optional. New incoming inline query
- chosenInlineResult
Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
- callbackQuery
Optional. New incoming callback query
- shippingQuery
Optional. New incoming shipping query. Only for invoices with flexible price
- preCheckoutQuery
Optional. New incoming pre-checkout query. Contains full information about checkout
- poll
Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot
- pollAnswer
Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
- myChatMember
Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.
- chatMember
Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates.
-
final
case class
UrlMessageEntity(offset: Int, length: Int) extends MessageEntity with Product with Serializable
url
url
- offset
Offset in UTF-16 code units to the start of the entity
- length
Length of the entity in UTF-16 code units
-
final
case class
User(id: Long, isBot: Boolean, firstName: String, lastName: Option[String] = Option.empty, username: Option[String] = Option.empty, languageCode: Option[String] = Option.empty, canJoinGroups: Option[Boolean] = Option.empty, canReadAllGroupMessages: Option[Boolean] = Option.empty, supportsInlineQueries: Option[Boolean] = Option.empty) extends Product with Serializable
This object represents a Telegram user or bot.
This object represents a Telegram user or bot.
- id
Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
- isBot
True, if this user is a bot
- firstName
User's or bot's first name
- lastName
Optional. User's or bot's last name
- username
Optional. User's or bot's username
- languageCode
Optional. IETF language tag of the user's language
- canJoinGroups
Optional. True, if the bot can be invited to groups. Returned only in getMe.
- canReadAllGroupMessages
Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
- supportsInlineQueries
Optional. True, if the bot supports inline queries. Returned only in getMe.
-
final
case class
UserProfilePhotos(totalCount: Int, photos: List[List[PhotoSize]] = List.empty) extends Product with Serializable
This object represent a user's profile pictures.
This object represent a user's profile pictures.
- totalCount
Total number of profile pictures the target user has
- photos
Requested profile pictures (in up to 4 sizes each)
-
final
case class
Venue(location: Location, title: String, address: String, foursquareId: Option[String] = Option.empty, foursquareType: Option[String] = Option.empty, googlePlaceId: Option[String] = Option.empty, googlePlaceType: Option[String] = Option.empty) extends Product with Serializable
This object represents a venue.
This object represents a venue.
- location
Venue location. Can't be a live location
- title
Name of the venue
- address
Address of the venue
- foursquareId
Optional. Foursquare identifier of the venue
- foursquareType
Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
- googlePlaceId
Optional. Google Places identifier of the venue
- googlePlaceType
Optional. Google Places type of the venue. (See supported types.)
-
final
case class
Video(fileId: String, fileUniqueId: String, width: Int, height: Int, duration: Int, thumb: Option[PhotoSize] = Option.empty, fileName: Option[String] = Option.empty, mimeType: Option[String] = Option.empty, fileSize: Option[Int] = Option.empty) extends Product with Serializable
This object represents a video file.
This object represents a video file.
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- width
Video width as defined by sender
- height
Video height as defined by sender
- duration
Duration of the video in seconds as defined by sender
- thumb
Optional. Video thumbnail
- fileName
Optional. Original filename as defined by sender
- mimeType
Optional. Mime type of a file as defined by sender
- fileSize
Optional. File size
-
final
case class
VideoNote(fileId: String, fileUniqueId: String, length: Int, duration: Int, thumb: Option[PhotoSize] = Option.empty, fileSize: Option[Int] = Option.empty) extends Product with Serializable
This object represents a video message (available in Telegram apps as of v.4.0).
This object represents a video message (available in Telegram apps as of v.4.0).
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- length
Video width and height (diameter of the video message) as defined by sender
- duration
Duration of the video in seconds as defined by sender
- thumb
Optional. Video thumbnail
- fileSize
Optional. File size
-
final
case class
Voice(fileId: String, fileUniqueId: String, duration: Int, mimeType: Option[String] = Option.empty, fileSize: Option[Int] = Option.empty) extends Product with Serializable
This object represents a voice note.
This object represents a voice note.
- fileId
Identifier for this file, which can be used to download or reuse the file
- fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- duration
Duration of the audio in seconds as defined by sender
- mimeType
Optional. MIME type of the file as defined by sender
- fileSize
Optional. File size
-
final
case class
VoiceChatEnded(duration: Int) extends Product with Serializable
This object represents a service message about a voice chat ended in the chat.
This object represents a service message about a voice chat ended in the chat.
- duration
Voice chat duration; in seconds
-
final
case class
VoiceChatParticipantsInvited(users: List[User] = List.empty) extends Product with Serializable
This object represents a service message about new members invited to a voice chat.
This object represents a service message about new members invited to a voice chat.
- users
Optional. New members that were invited to the voice chat
-
final
case class
VoiceChatScheduled(startDate: Int) extends Product with Serializable
This object represents a service message about a voice chat scheduled in the chat.
This object represents a service message about a voice chat scheduled in the chat.
- startDate
Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator
-
final
case class
WebhookInfo(url: String, hasCustomCertificate: Boolean, pendingUpdateCount: Int, ipAddress: Option[String] = Option.empty, lastErrorDate: Option[Int] = Option.empty, lastErrorMessage: Option[String] = Option.empty, maxConnections: Option[Int] = Option.empty, allowedUpdates: List[String] = List.empty) extends Product with Serializable
Contains information about the current status of a webhook.
Contains information about the current status of a webhook.
- url
Webhook URL, may be empty if webhook is not set up
- hasCustomCertificate
True, if a custom certificate was provided for webhook certificate checks
- pendingUpdateCount
Number of updates awaiting delivery
- ipAddress
Optional. Currently used webhook IP address
- lastErrorDate
Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook
- lastErrorMessage
Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook
- maxConnections
Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery
- allowedUpdates
Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member
Value Members
-
object
BotCommandScopeAllChatAdministrators extends BotCommandScope with Product with Serializable
Represents the scope of bot commands, covering all group and supergroup chat administrators.
-
object
BotCommandScopeAllGroupChats extends BotCommandScope with Product with Serializable
Represents the scope of bot commands, covering all group and supergroup chats.
-
object
BotCommandScopeAllPrivateChats extends BotCommandScope with Product with Serializable
Represents the scope of bot commands, covering all private chats.
-
object
BotCommandScopeDefault extends BotCommandScope with Product with Serializable
Represents the default scope of bot commands.
Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
-
object
CallbackGame extends Product with Serializable
A placeholder, currently holds no information.
A placeholder, currently holds no information. Use BotFather to set up your game.
- object CirceImplicits
- object EmojiBasketball extends Emoji with Product with Serializable
- object EmojiBowling extends Emoji with Product with Serializable
- object EmojiDarts extends Emoji with Product with Serializable
- object EmojiDice extends Emoji with Product with Serializable
- object EmojiFootball extends Emoji with Product with Serializable
- object EmojiSlotMachine extends Emoji with Product with Serializable
- object Html extends ParseMode with Product with Serializable
-
object
InputFile extends Product with Serializable
This object represents the contents of a file to be uploaded.
This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.
- object Markdown extends ParseMode with Product with Serializable
- object Markdown2 extends ParseMode with Product with Serializable
-
object
VoiceChatStarted extends Product with Serializable
This object represents a service message about a voice chat started in the chat.
This object represents a service message about a voice chat started in the chat. Currently holds no information.
- object uPickleImplicits