Package com.github.lamba92.kotlingram.api.generated

Types

AddStickerToSetRequest
Link copied to clipboard
common
data class AddStickerToSetRequest(userId: Int, name: String, pngSticker: String?, tgsSticker: String?, emojis: String, maskPosition: MaskPosition?)
Request body for addStickerToSet
Animation
Link copied to clipboard
common
data class Animation(fileId: String, fileUniqueId: String, width: Int, height: Int, duration: Int, thumb: PhotoSize?, fileName: String?, mimeType: String?, fileSize: Int?)
This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
AnswerCallbackQueryRequest
Link copied to clipboard
common
data class AnswerCallbackQueryRequest(callbackQueryId: String, text: String?, showAlert: Boolean, url: String?, cacheTime: Int?)
Request body for answerCallbackQuery
AnswerInlineQueryRequest
Link copied to clipboard
common
data class AnswerInlineQueryRequest(inlineQueryId: String, results: List<InlineQueryResult>, cacheTime: Int?, isPersonal: Boolean, nextOffset: String?, switchPmText: String?, switchPmParameter: String?)
Request body for answerInlineQuery
AnswerPreCheckoutQueryRequest
Link copied to clipboard
common
data class AnswerPreCheckoutQueryRequest(preCheckoutQueryId: String, ok: Boolean, errorMessage: String?)
Request body for answerPreCheckoutQuery
AnswerShippingQueryRequest
Link copied to clipboard
common
data class AnswerShippingQueryRequest(shippingQueryId: String, ok: Boolean, shippingOptions: List<ShippingOption>, errorMessage: String?)
Request body for answerShippingQuery
Audio
Link copied to clipboard
common
data class Audio(fileId: String, fileUniqueId: String, duration: Int, performer: String?, title: String?, fileName: String?, mimeType: String?, fileSize: Int?, thumb: PhotoSize?)
This object represents an audio file to be treated as music by the Telegram clients.
BotCommand
Link copied to clipboard
common
data class BotCommand(command: String, description: String)
This object represents a bot command.
CallbackGame
Link copied to clipboard
common
typealias CallbackGame = String

A placeholder, currently holds no information. Use BotFather to set up your game.

CallbackQuery
Link copied to clipboard
common
data class CallbackQuery(id: String, from: User, message: Message?, inlineMessageId: String?, chatInstance: String, data: String?, gameShortName: String?)
This object represents an incoming callback query from a callback button in an inline keyboard.
Chat
Link copied to clipboard
common
data class Chat(id: Int, title: String?, username: String?, firstName: String?, lastName: String?, photo: ChatPhoto?, bio: String?, description: String?, inviteLink: String?, pinnedMessage: Message?, permissions: ChatPermissions?, slowModeDelay: Int?, stickerSetName: String?, canSetStickerSet: Boolean, linkedChatId: Int?, location: ChatLocation?, type: String)
This object represents a chat.
ChatLocation
Link copied to clipboard
common
data class ChatLocation(location: Location, address: String)
Represents a location to which a chat is connected.
ChatMember
Link copied to clipboard
common
data class ChatMember(user: User, status: String, customTitle: String?, isAnonymous: Boolean, canBeEdited: Boolean, canPostMessages: Boolean, canEditMessages: Boolean, canDeleteMessages: Boolean, canRestrictMembers: Boolean, canPromoteMembers: Boolean, canChangeInfo: Boolean, canInviteUsers: Boolean, canPinMessages: Boolean, isMember: Boolean, canSendMessages: Boolean, canSendMediaMessages: Boolean, canSendPolls: Boolean, canSendOtherMessages: Boolean, canAddWebPagePreviews: Boolean, untilDate: Int?)
This object contains information about one member of a chat.
ChatPermissions
Link copied to clipboard
common
data class ChatPermissions(canSendMessages: Boolean, canSendMediaMessages: Boolean, canSendPolls: Boolean, canSendOtherMessages: Boolean, canAddWebPagePreviews: Boolean, canChangeInfo: Boolean, canInviteUsers: Boolean, canPinMessages: Boolean)
Describes actions that a non-administrator user is allowed to take in a chat.
ChatPhoto
Link copied to clipboard
common
data class ChatPhoto(smallFileId: String, smallFileUniqueId: String, bigFileId: String, bigFileUniqueId: String)
This object represents a chat photo.
ChosenInlineResult
Link copied to clipboard
common
data class ChosenInlineResult(resultId: String, from: User, location: Location?, inlineMessageId: String?, query: String)
Represents a result of an inline query that was chosen by the user and sent to their chat partner.
Contact
Link copied to clipboard
common
data class Contact(phoneNumber: String, firstName: String, lastName: String?, userId: Int?, vcard: String?)
This object represents a phone contact.
CopyMessageRequest
Link copied to clipboard
common
data class CopyMessageRequest(chatId: Int, fromChatId: Int, messageId: Int, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for copyMessage
CreateNewStickerSetRequest
Link copied to clipboard
common
data class CreateNewStickerSetRequest(userId: Int, name: String, title: String, pngSticker: String?, tgsSticker: String?, emojis: String, containsMasks: Boolean, maskPosition: MaskPosition?)
Request body for createNewStickerSet
DeleteChatPhotoRequest
Link copied to clipboard
common
data class DeleteChatPhotoRequest(chatId: Int)
Request body for deleteChatPhoto
DeleteChatStickerSetRequest
Link copied to clipboard
common
data class DeleteChatStickerSetRequest(chatId: Int)
Request body for deleteChatStickerSet
DeleteMessageRequest
Link copied to clipboard
common
data class DeleteMessageRequest(chatId: Int, messageId: Int)
Request body for deleteMessage
DeleteStickerFromSetRequest
Link copied to clipboard
common
data class DeleteStickerFromSetRequest(sticker: String)
Request body for deleteStickerFromSet
DeleteWebhookRequest
Link copied to clipboard
common
data class DeleteWebhookRequest(dropPendingUpdates: Boolean)
Request body for deleteWebhook
Dice
Link copied to clipboard
common
data class Dice(emoji: String, value: Int)
This object represents an animated emoji that displays a random value.
Document
Link copied to clipboard
common
data class Document(fileId: String, fileUniqueId: String, thumb: PhotoSize?, fileName: String?, mimeType: String?, fileSize: Int?)
This object represents a general file (as opposed to photos, voice messages and audio files).
EditMessageCaptionRequest
Link copied to clipboard
common
data class EditMessageCaptionRequest(chatId: Int?, messageId: Int?, inlineMessageId: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?)
Request body for editMessageCaption
EditMessageLiveLocationRequest
Link copied to clipboard
common
data class EditMessageLiveLocationRequest(chatId: Int?, messageId: Int?, inlineMessageId: String?, latitude: Float, longitude: Float, horizontalAccuracy: Float?, heading: Int?, proximityAlertRadius: Int?, replyMarkup: InlineKeyboardMarkup?)
Request body for editMessageLiveLocation
EditMessageMediaRequest
Link copied to clipboard
common
data class EditMessageMediaRequest(chatId: Int?, messageId: Int?, inlineMessageId: String?, media: InputMedia, replyMarkup: InlineKeyboardMarkup?)
Request body for editMessageMedia
EditMessageReplyMarkupRequest
Link copied to clipboard
common
data class EditMessageReplyMarkupRequest(chatId: Int?, messageId: Int?, inlineMessageId: String?, replyMarkup: InlineKeyboardMarkup?)
Request body for editMessageReplyMarkup
EditMessageTextRequest
Link copied to clipboard
common
data class EditMessageTextRequest(chatId: Int?, messageId: Int?, inlineMessageId: String?, text: String, parseMode: String?, entities: List<MessageEntity>, disableWebPagePreview: Boolean, replyMarkup: InlineKeyboardMarkup?)
Request body for editMessageText
EncryptedCredentials
Link copied to clipboard
common
data class EncryptedCredentials(data: String, hash: String, secret: String)
Contains data required for decrypting and authenticating EncryptedPassportElement.
EncryptedPassportElement
Link copied to clipboard
common
data class EncryptedPassportElement(data: String?, phoneNumber: String?, email: String?, files: List<PassportFile>, frontSide: PassportFile?, reverseSide: PassportFile?, selfie: PassportFile?, translation: List<PassportFile>, hash: String, type: String)
Contains information about documents or other Telegram Passport elements shared with the bot by the user.
ExportChatInviteLinkRequest
Link copied to clipboard
common
data class ExportChatInviteLinkRequest(chatId: Int)
Request body for exportChatInviteLink
File
Link copied to clipboard
common
data class File(fileId: String, fileUniqueId: String, fileSize: Int?, filePath: String?)
This object represents a file ready to be downloaded.
ForceReply
Link copied to clipboard
common
data class ForceReply(forceReply: Boolean, selective: Boolean) : ReplyMarkup
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').
ForwardMessageRequest
Link copied to clipboard
common
data class ForwardMessageRequest(chatId: Int, fromChatId: Int, disableNotification: Boolean, messageId: Int)
Request body for forwardMessage
Game
Link copied to clipboard
common
data class Game(title: String, description: String, photo: List<PhotoSize>, text: String?, textEntities: List<MessageEntity>, animation: Animation?)
This object represents a game.
GameHighScore
Link copied to clipboard
common
data class GameHighScore(position: Int, user: User, score: Int)
This object represents one row of the high scores table for a game.
GetChatAdministratorsRequest
Link copied to clipboard
common
data class GetChatAdministratorsRequest(chatId: Int)
Request body for getChatAdministrators
GetChatMemberRequest
Link copied to clipboard
common
data class GetChatMemberRequest(chatId: Int, userId: Int)
Request body for getChatMember
GetChatMembersCountRequest
Link copied to clipboard
common
data class GetChatMembersCountRequest(chatId: Int)
Request body for getChatMembersCount
GetChatRequest
Link copied to clipboard
common
data class GetChatRequest(chatId: Int)
Request body for getChat
GetFileRequest
Link copied to clipboard
common
data class GetFileRequest(fileId: String)
Request body for getFile
GetGameHighScoresRequest
Link copied to clipboard
common
data class GetGameHighScoresRequest(userId: Int, chatId: Int?, messageId: Int?, inlineMessageId: String?)
Request body for getGameHighScores
GetStickerSetRequest
Link copied to clipboard
common
data class GetStickerSetRequest(name: String)
Request body for getStickerSet
GetUpdatesRequest
Link copied to clipboard
common
data class GetUpdatesRequest(offset: Int?, limit: Int?, timeout: Int?, allowedUpdates: List<String>)
Request body for getUpdates
GetUserProfilePhotosRequest
Link copied to clipboard
common
data class GetUserProfilePhotosRequest(userId: Int, offset: Int?, limit: Int?)
Request body for getUserProfilePhotos
InlineKeyboardButton
Link copied to clipboard
common
data class InlineKeyboardButton(text: String, url: String?, loginUrl: LoginUrl?, callbackData: String?, switchInlineQuery: String?, switchInlineQueryCurrentChat: String?, callbackGame: CallbackGame?, pay: Boolean)
This object represents one button of an inline keyboard.
InlineKeyboardMarkup
Link copied to clipboard
common
data class InlineKeyboardMarkup(inlineKeyboard: List<List<InlineKeyboardButton>>) : ReplyMarkup
This object represents an inline keyboard that appears right next to the message it belongs to.
InlineQuery
Link copied to clipboard
common
data class InlineQuery(id: String, from: User, location: Location?, query: String, offset: String)
This object represents an incoming inline query.
InlineQueryResult
Link copied to clipboard
common
sealed class InlineQueryResult
This object represents one result of an inline query.
InlineQueryResultArticle
Link copied to clipboard
common
data class InlineQueryResultArticle(id: String, title: String, inputMessageContent: InputMessageContent, replyMarkup: InlineKeyboardMarkup?, url: String?, hideUrl: Boolean, description: String?, thumbUrl: String?, thumbWidth: Int?, thumbHeight: Int?, type: String) : InlineQueryResult
Represents a link to an article or web page.
InlineQueryResultAudio
Link copied to clipboard
common
data class InlineQueryResultAudio(id: String, audioUrl: String, title: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, performer: String?, audioDuration: Int?, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to an MP3 audio file.
InlineQueryResultCachedAudio
Link copied to clipboard
common
data class InlineQueryResultCachedAudio(id: String, audioFileId: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to an MP3 audio file stored on the Telegram servers.
InlineQueryResultCachedDocument
Link copied to clipboard
common
data class InlineQueryResultCachedDocument(id: String, title: String, documentFileId: String, description: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a file stored on the Telegram servers.
InlineQueryResultCachedGif
Link copied to clipboard
common
data class InlineQueryResultCachedGif(id: String, gifFileId: String, title: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to an animated GIF file stored on the Telegram servers.
InlineQueryResultCachedMpeg4Gif
Link copied to clipboard
common
data class InlineQueryResultCachedMpeg4Gif(id: String, mpeg4FileId: String, title: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers.
InlineQueryResultCachedPhoto
Link copied to clipboard
common
data class InlineQueryResultCachedPhoto(id: String, photoFileId: String, title: String?, description: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a photo stored on the Telegram servers.
InlineQueryResultCachedSticker
Link copied to clipboard
common
data class InlineQueryResultCachedSticker(id: String, stickerFileId: String, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a sticker stored on the Telegram servers.
InlineQueryResultCachedVideo
Link copied to clipboard
common
data class InlineQueryResultCachedVideo(id: String, videoFileId: String, title: String, description: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a video file stored on the Telegram servers.
InlineQueryResultCachedVoice
Link copied to clipboard
common
data class InlineQueryResultCachedVoice(id: String, voiceFileId: String, title: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a voice message stored on the Telegram servers.
InlineQueryResultContact
Link copied to clipboard
common
data class InlineQueryResultContact(id: String, phoneNumber: String, firstName: String, lastName: String?, vcard: String?, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, thumbUrl: String?, thumbWidth: Int?, thumbHeight: Int?, type: String) : InlineQueryResult
Represents a contact with a phone number.
InlineQueryResultDocument
Link copied to clipboard
common
data class InlineQueryResultDocument(id: String, title: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, documentUrl: String, mimeType: String, description: String?, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, thumbUrl: String?, thumbWidth: Int?, thumbHeight: Int?, type: String) : InlineQueryResult
Represents a link to a file.
InlineQueryResultGame
Link copied to clipboard
common
data class InlineQueryResultGame(id: String, gameShortName: String, replyMarkup: InlineKeyboardMarkup?, type: String) : InlineQueryResult
Represents a Game.
InlineQueryResultGif
Link copied to clipboard
common
data class InlineQueryResultGif(id: String, gifUrl: String, gifWidth: Int?, gifHeight: Int?, gifDuration: Int?, thumbUrl: String, thumbMimeType: String?, title: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to an animated GIF file.
InlineQueryResultLocation
Link copied to clipboard
common
data class InlineQueryResultLocation(id: String, latitude: Float, longitude: Float, title: String, horizontalAccuracy: Float?, livePeriod: Int?, heading: Int?, proximityAlertRadius: Int?, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, thumbUrl: String?, thumbWidth: Int?, thumbHeight: Int?, type: String) : InlineQueryResult
Represents a location on a map.
InlineQueryResultMpeg4Gif
Link copied to clipboard
common
data class InlineQueryResultMpeg4Gif(id: String, mpeg4Url: String, mpeg4Width: Int?, mpeg4Height: Int?, mpeg4Duration: Int?, thumbUrl: String, thumbMimeType: String?, title: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound).
InlineQueryResultPhoto
Link copied to clipboard
common
data class InlineQueryResultPhoto(id: String, photoUrl: String, thumbUrl: String, photoWidth: Int?, photoHeight: Int?, title: String?, description: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a photo.
InlineQueryResultVenue
Link copied to clipboard
common
data class InlineQueryResultVenue(id: String, latitude: Float, longitude: Float, title: String, address: String, foursquareId: String?, foursquareType: String?, googlePlaceId: String?, googlePlaceType: String?, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, thumbUrl: String?, thumbWidth: Int?, thumbHeight: Int?, type: String) : InlineQueryResult
Represents a venue.
InlineQueryResultVideo
Link copied to clipboard
common
data class InlineQueryResultVideo(id: String, videoUrl: String, mimeType: String, thumbUrl: String, title: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, videoWidth: Int?, videoHeight: Int?, videoDuration: Int?, description: String?, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a page containing an embedded video player or a video file.
InlineQueryResultVoice
Link copied to clipboard
common
data class InlineQueryResultVoice(id: String, voiceUrl: String, title: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, voiceDuration: Int?, replyMarkup: InlineKeyboardMarkup?, inputMessageContent: InputMessageContent?, type: String) : InlineQueryResult
Represents a link to a voice recording in an .OGG container encoded with OPUS.
InputContactMessageContent
Link copied to clipboard
common
data class InputContactMessageContent(phoneNumber: String, firstName: String, lastName: String?, vcard: String?) : InputMessageContent
Represents the content of a contact message to be sent as the result of an inline query.
InputLocationMessageContent
Link copied to clipboard
common
data class InputLocationMessageContent(latitude: Float, longitude: Float, horizontalAccuracy: Float?, livePeriod: Int?, heading: Int?, proximityAlertRadius: Int?) : InputMessageContent
Represents the content of a location message to be sent as the result of an inline query.
InputMedia
Link copied to clipboard
common
sealed class InputMedia
This object represents the content of a media message to be sent.
InputMediaAnimation
Link copied to clipboard
common
data class InputMediaAnimation(media: String, thumb: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, width: Int?, height: Int?, duration: Int?)
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
InputMediaAudio
Link copied to clipboard
common
data class InputMediaAudio(media: String, thumb: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, duration: Int?, performer: String?, title: String?) : InputMedia
Represents an audio file to be treated as music to be sent.
InputMediaDocument
Link copied to clipboard
common
data class InputMediaDocument(media: String, thumb: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, disableContentTypeDetection: Boolean) : InputMedia
Represents a general file to be sent.
InputMediaPhoto
Link copied to clipboard
common
data class InputMediaPhoto(media: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>) : InputMedia
Represents a photo to be sent.
InputMediaVideo
Link copied to clipboard
common
data class InputMediaVideo(media: String, thumb: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, width: Int?, height: Int?, duration: Int?, supportsStreaming: Boolean) : InputMedia
Represents a video to be sent.
InputMessageContent
Link copied to clipboard
common
sealed class InputMessageContent
This object represents the content of a message to be sent as a result of an inline query.
InputTextMessageContent
Link copied to clipboard
common
data class InputTextMessageContent(messageText: String, parseMode: String?, entities: List<MessageEntity>, disableWebPagePreview: Boolean) : InputMessageContent
Represents the content of a text message to be sent as the result of an inline query.
InputVenueMessageContent
Link copied to clipboard
common
data class InputVenueMessageContent(latitude: Float, longitude: Float, title: String, address: String, foursquareId: String?, foursquareType: String?, googlePlaceId: String?, googlePlaceType: String?) : InputMessageContent
Represents the content of a venue message to be sent as the result of an inline query.
Invoice
Link copied to clipboard
common
data class Invoice(title: String, description: String, startParameter: String, currency: String, totalAmount: Int)
This object contains basic information about an invoice.
KeyboardButton
Link copied to clipboard
common
data class KeyboardButton(text: String, requestContact: Boolean, requestLocation: Boolean, requestPoll: KeyboardButtonPollType?)
This object represents one button of the reply keyboard.
KeyboardButtonPollType
Link copied to clipboard
common
data class KeyboardButtonPollType(type: String?)
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
KickChatMemberRequest
Link copied to clipboard
common
data class KickChatMemberRequest(chatId: Int, userId: Int, untilDate: Int?)
Request body for kickChatMember
LabeledPrice
Link copied to clipboard
common
data class LabeledPrice(label: String, amount: Int)
This object represents a portion of the price for goods or services.
LeaveChatRequest
Link copied to clipboard
common
data class LeaveChatRequest(chatId: Int)
Request body for leaveChat
Location
Link copied to clipboard
common
data class Location(longitude: Float, latitude: Float, horizontalAccuracy: Float?, livePeriod: Int?, heading: Int?, proximityAlertRadius: Int?)
This object represents a point on the map.
LoginUrl
Link copied to clipboard
common
data class LoginUrl(url: String, forwardText: String?, botUsername: String?, requestWriteAccess: Boolean)
This object represents a parameter of the inline keyboard button used to automatically authorize a user.
MaskPosition
Link copied to clipboard
common
data class MaskPosition(point: String, xShift: Float, yShift: Float, scale: Float)
This object describes the position on faces where a mask should be placed by default.
Message
Link copied to clipboard
common
data class Message(messageId: Int, from: User?, senderChat: Chat?, date: Int, chat: Chat, forwardFrom: User?, forwardFromChat: Chat?, forwardFromMessageId: Int?, forwardSignature: String?, forwardSenderName: String?, forwardDate: Int?, replyToMessage: Message?, viaBot: User?, editDate: Int?, mediaGroupId: String?, authorSignature: String?, text: String?, entities: List<MessageEntity>, animation: Animation?, audio: Audio?, document: Document?, photo: List<PhotoSize>, sticker: Sticker?, video: Video?, videoNote: VideoNote?, voice: Voice?, caption: String?, captionEntities: List<MessageEntity>, contact: Contact?, dice: Dice?, game: Game?, poll: Poll?, venue: Venue?, location: Location?, newChatMembers: List<User>, leftChatMember: User?, newChatTitle: String?, newChatPhoto: List<PhotoSize>, deleteChatPhoto: Boolean, groupChatCreated: Boolean, supergroupChatCreated: Boolean, channelChatCreated: Boolean, migrateToChatId: Int?, migrateFromChatId: Int?, pinnedMessage: Message?, invoice: Invoice?, successfulPayment: SuccessfulPayment?, connectedWebsite: String?, passportData: PassportData?, proximityAlertTriggered: ProximityAlertTriggered?, replyMarkup: InlineKeyboardMarkup?)
This object represents a message.
MessageEntity
Link copied to clipboard
common
data class MessageEntity(offset: Int, length: Int, url: String?, user: User?, language: String?, type: String)
This object represents one special entity in a text message.
MessageId
Link copied to clipboard
common
data class MessageId(messageId: Int)
This object represents a unique message identifier.
OrderInfo
Link copied to clipboard
common
data class OrderInfo(name: String?, phoneNumber: String?, email: String?, shippingAddress: ShippingAddress?)
This object represents information about an order.
PassportData
Link copied to clipboard
common
data class PassportData(data: List<EncryptedPassportElement>, credentials: EncryptedCredentials)
Contains information about Telegram Passport data shared with the bot by the user.
PassportFile
Link copied to clipboard
common
data class PassportFile(fileId: String, fileUniqueId: String, fileSize: Int, fileDate: Int)
This object represents a file uploaded to Telegram Passport.
PhotoSize
Link copied to clipboard
common
data class PhotoSize(fileId: String, fileUniqueId: String, width: Int, height: Int, fileSize: Int?)
This object represents one size of a photo or a file / sticker thumbnail.
PinChatMessageRequest
Link copied to clipboard
common
data class PinChatMessageRequest(chatId: Int, messageId: Int, disableNotification: Boolean)
Request body for pinChatMessage
Poll
Link copied to clipboard
common
data class Poll(id: String, question: String, options: List<PollOption>, totalVoterCount: Int, isClosed: Boolean, isAnonymous: Boolean, allowsMultipleAnswers: Boolean, correctOptionId: Int?, explanation: String?, explanationEntities: List<MessageEntity>, openPeriod: Int?, closeDate: Int?, type: String)
This object contains information about a poll.
PollAnswer
Link copied to clipboard
common
data class PollAnswer(pollId: String, user: User, optionIds: List<Int>)
This object represents an answer of a user in a non-anonymous poll.
PollOption
Link copied to clipboard
common
data class PollOption(text: String, voterCount: Int)
This object contains information about one answer option in a poll.
PreCheckoutQuery
Link copied to clipboard
common
data class PreCheckoutQuery(id: String, from: User, currency: String, totalAmount: Int, invoicePayload: String, shippingOptionId: String?, orderInfo: OrderInfo?)
This object contains information about an incoming pre-checkout query.
PromoteChatMemberRequest
Link copied to clipboard
common
data class PromoteChatMemberRequest(chatId: Int, userId: Int, isAnonymous: Boolean, canChangeInfo: Boolean, canPostMessages: Boolean, canEditMessages: Boolean, canDeleteMessages: Boolean, canInviteUsers: Boolean, canRestrictMembers: Boolean, canPinMessages: Boolean, canPromoteMembers: Boolean)
Request body for promoteChatMember
ProximityAlertTriggered
Link copied to clipboard
common
data class ProximityAlertTriggered(traveler: User, watcher: User, distance: Int)
This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
ReplyKeyboardMarkup
Link copied to clipboard
common
data class ReplyKeyboardMarkup(keyboard: List<List<KeyboardButton>>, resizeKeyboard: Boolean, oneTimeKeyboard: Boolean, selective: Boolean) : ReplyMarkup
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
ReplyKeyboardRemove
Link copied to clipboard
common
data class ReplyKeyboardRemove(removeKeyboard: Boolean, selective: Boolean) : ReplyMarkup
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.
ReplyMarkup
Link copied to clipboard
common
sealed class ReplyMarkup
ResponseParameters
Link copied to clipboard
common
data class ResponseParameters(migrateToChatId: Int?, retryAfter: Int?)
Contains information about why a request was unsuccessful.
RestrictChatMemberRequest
Link copied to clipboard
common
data class RestrictChatMemberRequest(chatId: Int, userId: Int, permissions: ChatPermissions, untilDate: Int?)
Request body for restrictChatMember
SendAnimationRequest
Link copied to clipboard
common
data class SendAnimationRequest(chatId: Int, animation: String, duration: Int?, width: Int?, height: Int?, thumb: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendAnimation
SendAudioRequest
Link copied to clipboard
common
data class SendAudioRequest(chatId: Int, audio: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, duration: Int?, performer: String?, title: String?, thumb: String?, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendAudio
SendChatActionRequest
Link copied to clipboard
common
data class SendChatActionRequest(chatId: Int, action: String)
Request body for sendChatAction
SendContactRequest
Link copied to clipboard
common
data class SendContactRequest(chatId: Int, phoneNumber: String, firstName: String, lastName: String?, vcard: String?, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendContact
SendDiceRequest
Link copied to clipboard
common
data class SendDiceRequest(chatId: Int, emoji: String?, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendDice
SendDocumentRequest
Link copied to clipboard
common
data class SendDocumentRequest(chatId: Int, document: String, thumb: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, disableContentTypeDetection: Boolean, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendDocument
SendGameRequest
Link copied to clipboard
common
data class SendGameRequest(chatId: Int, gameShortName: String, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: InlineKeyboardMarkup?)
Request body for sendGame
SendInvoiceRequest
Link copied to clipboard
common
data class SendInvoiceRequest(chatId: Int, title: String, description: String, payload: String, providerToken: String, startParameter: String, currency: String, prices: List<LabeledPrice>, providerData: String?, photoUrl: String?, photoSize: Int?, photoWidth: Int?, photoHeight: Int?, needName: Boolean, needPhoneNumber: Boolean, needEmail: Boolean, needShippingAddress: Boolean, sendPhoneNumberToProvider: Boolean, sendEmailToProvider: Boolean, isFlexible: Boolean, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: InlineKeyboardMarkup?)
Request body for sendInvoice
SendLocationRequest
Link copied to clipboard
common
data class SendLocationRequest(chatId: Int, latitude: Float, longitude: Float, horizontalAccuracy: Float?, livePeriod: Int?, heading: Int?, proximityAlertRadius: Int?, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendLocation
SendMediaGroupRequest
Link copied to clipboard
common
data class SendMediaGroupRequest(chatId: Int, media: List<InputMedia>, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean)
Request body for sendMediaGroup
SendMessageRequest
Link copied to clipboard
common
data class SendMessageRequest(chatId: Int, text: String, parseMode: String?, entities: List<MessageEntity>, disableWebPagePreview: Boolean, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendMessage
SendPhotoRequest
Link copied to clipboard
common
data class SendPhotoRequest(chatId: Int, photo: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendPhoto
SendPollRequest
Link copied to clipboard
common
data class SendPollRequest(chatId: Int, question: String, options: List<String>, isAnonymous: Boolean, type: String?, allowsMultipleAnswers: Boolean, correctOptionId: Int?, explanation: String?, explanationParseMode: String?, explanationEntities: List<MessageEntity>, openPeriod: Int?, closeDate: Int?, isClosed: Boolean, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendPoll
SendStickerRequest
Link copied to clipboard
common
data class SendStickerRequest(chatId: Int, sticker: String, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendSticker
SendVenueRequest
Link copied to clipboard
common
data class SendVenueRequest(chatId: Int, latitude: Float, longitude: Float, title: String, address: String, foursquareId: String?, foursquareType: String?, googlePlaceId: String?, googlePlaceType: String?, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendVenue
SendVideoNoteRequest
Link copied to clipboard
common
data class SendVideoNoteRequest(chatId: Int, videoNote: String, duration: Int?, length: Int?, thumb: String?, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendVideoNote
SendVideoRequest
Link copied to clipboard
common
data class SendVideoRequest(chatId: Int, video: String, duration: Int?, width: Int?, height: Int?, thumb: String?, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, supportsStreaming: Boolean, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendVideo
SendVoiceRequest
Link copied to clipboard
common
data class SendVoiceRequest(chatId: Int, voice: String, caption: String?, parseMode: String?, captionEntities: List<MessageEntity>, duration: Int?, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)
Request body for sendVoice
SetChatAdministratorCustomTitleRequest
Link copied to clipboard
common
data class SetChatAdministratorCustomTitleRequest(chatId: Int, userId: Int, customTitle: String)
SetChatDescriptionRequest
Link copied to clipboard
common
data class SetChatDescriptionRequest(chatId: Int, description: String?)
Request body for setChatDescription
SetChatPermissionsRequest
Link copied to clipboard
common
data class SetChatPermissionsRequest(chatId: Int, permissions: ChatPermissions)
Request body for setChatPermissions
SetChatPhotoRequest
Link copied to clipboard
common
data class SetChatPhotoRequest(chatId: Int, photo: String)
Request body for setChatPhoto
SetChatStickerSetRequest
Link copied to clipboard
common
data class SetChatStickerSetRequest(chatId: Int, stickerSetName: String)
Request body for setChatStickerSet
SetChatTitleRequest
Link copied to clipboard
common
data class SetChatTitleRequest(chatId: Int, title: String)
Request body for setChatTitle
SetGameScoreRequest
Link copied to clipboard
common
data class SetGameScoreRequest(userId: Int, score: Int, force: Boolean, disableEditMessage: Boolean, chatId: Int?, messageId: Int?, inlineMessageId: String?)
Request body for setGameScore
SetMyCommandsRequest
Link copied to clipboard
common
data class SetMyCommandsRequest(commands: List<BotCommand>)
Request body for setMyCommands
SetPassportDataErrorsRequest
Link copied to clipboard
common
data class SetPassportDataErrorsRequest(userId: Int, errors: List<PassportElementError>)
Request body for setPassportDataErrors
SetStickerPositionInSetRequest
Link copied to clipboard
common
data class SetStickerPositionInSetRequest(sticker: String, position: Int)
Request body for setStickerPositionInSet
SetStickerSetThumbRequest
Link copied to clipboard
common
data class SetStickerSetThumbRequest(name: String, userId: Int, thumb: String?)
Request body for setStickerSetThumb
SetWebhookRequest
Link copied to clipboard
common
data class SetWebhookRequest(url: String, certificate: String?, ipAddress: String?, maxConnections: Int?, allowedUpdates: List<String>, dropPendingUpdates: Boolean)
Request body for setWebhook
ShippingAddress
Link copied to clipboard
common
data class ShippingAddress(countryCode: String, state: String, city: String, streetLine1: String, streetLine2: String, postCode: String)
This object represents a shipping address.
ShippingOption
Link copied to clipboard
common
data class ShippingOption(id: String, title: String, prices: List<LabeledPrice>)
This object represents one shipping option.
ShippingQuery
Link copied to clipboard
common
data class ShippingQuery(id: String, from: User, invoicePayload: String, shippingAddress: ShippingAddress)
This object contains information about an incoming shipping query.
Sticker
Link copied to clipboard
common
data class Sticker(fileId: String, fileUniqueId: String, width: Int, height: Int, isAnimated: Boolean, thumb: PhotoSize?, emoji: String?, setName: String?, maskPosition: MaskPosition?, fileSize: Int?)
This object represents a sticker.
StickerSet
Link copied to clipboard
common
data class StickerSet(name: String, title: String, isAnimated: Boolean, containsMasks: Boolean, stickers: List<Sticker>, thumb: PhotoSize?)
This object represents a sticker set.
StopMessageLiveLocationRequest
Link copied to clipboard
common
data class StopMessageLiveLocationRequest(chatId: Int?, messageId: Int?, inlineMessageId: String?, replyMarkup: InlineKeyboardMarkup?)
Request body for stopMessageLiveLocation
StopPollRequest
Link copied to clipboard
common
data class StopPollRequest(chatId: Int, messageId: Int, replyMarkup: InlineKeyboardMarkup?)
Request body for stopPoll
SuccessfulPayment
Link copied to clipboard
common
data class SuccessfulPayment(currency: String, totalAmount: Int, invoicePayload: String, shippingOptionId: String?, orderInfo: OrderInfo?, telegramPaymentChargeId: String, providerPaymentChargeId: String)
This object contains basic information about a successful payment.
UnbanChatMemberRequest
Link copied to clipboard
common
data class UnbanChatMemberRequest(chatId: Int, userId: Int, onlyIfBanned: Boolean)
Request body for unbanChatMember
UnpinAllChatMessagesRequest
Link copied to clipboard
common
data class UnpinAllChatMessagesRequest(chatId: Int)
Request body for unpinAllChatMessages
UnpinChatMessageRequest
Link copied to clipboard
common
data class UnpinChatMessageRequest(chatId: Int, messageId: Int?)
Request body for unpinChatMessage
Update
Link copied to clipboard
common
data class Update(updateId: Int, message: Message?, editedMessage: Message?, channelPost: Message?, editedChannelPost: Message?, inlineQuery: InlineQuery?, chosenInlineResult: ChosenInlineResult?, callbackQuery: CallbackQuery?, shippingQuery: ShippingQuery?, preCheckoutQuery: PreCheckoutQuery?, poll: Poll?, pollAnswer: PollAnswer?)
This object represents an incoming update.
UploadStickerFileRequest
Link copied to clipboard
common
data class UploadStickerFileRequest(userId: Int, pngSticker: String)
Request body for uploadStickerFile
User
Link copied to clipboard
common
data class User(id: Int, isBot: Boolean, firstName: String, lastName: String?, username: String?, languageCode: String?, canJoinGroups: Boolean, canReadAllGroupMessages: Boolean, supportsInlineQueries: Boolean)
This object represents a Telegram user or bot.
UserProfilePhotos
Link copied to clipboard
common
data class UserProfilePhotos(totalCount: Int, photos: List<List<PhotoSize>>)
This object represent a user's profile pictures.
Venue
Link copied to clipboard
common
data class Venue(location: Location, title: String, address: String, foursquareId: String?, foursquareType: String?, googlePlaceId: String?, googlePlaceType: String?)
This object represents a venue.
Video
Link copied to clipboard
common
data class Video(fileId: String, fileUniqueId: String, width: Int, height: Int, duration: Int, thumb: PhotoSize?, fileName: String?, mimeType: String?, fileSize: Int?)
This object represents a video file.
VideoNote
Link copied to clipboard
common
data class VideoNote(fileId: String, fileUniqueId: String, length: Int, duration: Int, thumb: PhotoSize?, fileSize: Int?)
This object represents a video message (available in Telegram apps as of v.4.0).
Voice
Link copied to clipboard
common
data class Voice(fileId: String, fileUniqueId: String, duration: Int, mimeType: String?, fileSize: Int?)
This object represents a voice note.
WebhookInfo
Link copied to clipboard
common
data class WebhookInfo(url: String, hasCustomCertificate: Boolean, pendingUpdateCount: Int, ipAddress: String?, lastErrorDate: Int?, lastErrorMessage: String?, maxConnections: Int?, allowedUpdates: List<String>)
Contains information about the current status of a webhook.

Functions

addStickerToSet
Link copied to clipboard
common
suspend fun TelegramBotApiClient.addStickerToSet(requestBody: AddStickerToSetRequest): TelegramResponse<Boolean>
Use this method to add a new sticker to a set created by the bot.
suspend fun TelegramBotApiClient.addStickerToSet(userId: Int, name: String, pngSticker: String? = null, tgsSticker: String? = null, emojis: String, maskPosition: MaskPosition? = null): TelegramResponse<Boolean>
Use this method to add a new sticker to a set created by the bot.
answerCallbackQuery
Link copied to clipboard
common
suspend fun TelegramBotApiClient.answerCallbackQuery(requestBody: AnswerCallbackQueryRequest): TelegramResponse<Boolean>
Use this method to send answers to callback queries sent from inline keyboards.
suspend fun TelegramBotApiClient.answerCallbackQuery(callbackQueryId: String, text: String? = null, showAlert: Boolean = false, url: String? = null, cacheTime: Int? = null): TelegramResponse<Boolean>
Use this method to send answers to callback queries sent from inline keyboards.
answerInlineQuery
Link copied to clipboard
common
suspend fun TelegramBotApiClient.answerInlineQuery(requestBody: AnswerInlineQueryRequest): TelegramResponse<Boolean>
Use this method to send answers to an inline query.
suspend fun TelegramBotApiClient.answerInlineQuery(inlineQueryId: String, results: List<InlineQueryResult> = emptyList(), cacheTime: Int? = null, isPersonal: Boolean = false, nextOffset: String? = null, switchPmText: String? = null, switchPmParameter: String? = null): TelegramResponse<Boolean>
Use this method to send answers to an inline query.
answerPreCheckoutQuery
Link copied to clipboard
common
Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query.
suspend fun TelegramBotApiClient.answerPreCheckoutQuery(preCheckoutQueryId: String, ok: Boolean, errorMessage: String? = null): TelegramResponse<Boolean>
Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query.
answerShippingQuery
Link copied to clipboard
common
suspend fun TelegramBotApiClient.answerShippingQuery(requestBody: AnswerShippingQueryRequest): TelegramResponse<Boolean>
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot.
suspend fun TelegramBotApiClient.answerShippingQuery(shippingQueryId: String, ok: Boolean, shippingOptions: List<ShippingOption> = emptyList(), errorMessage: String? = null): TelegramResponse<Boolean>
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot.
close
Link copied to clipboard
common
suspend fun TelegramBotApiClient.close(): TelegramResponse<Boolean>
Use this method to close the bot instance before moving it from one local server to another.
copyMessage
Link copied to clipboard
common
suspend fun TelegramBotApiClient.copyMessage(requestBody: CopyMessageRequest): TelegramResponse<MessageId>
Use this method to copy messages of any kind.
suspend fun TelegramBotApiClient.copyMessage(chatId: Int, fromChatId: Int, messageId: Int, caption: String? = null, parseMode: String? = null, captionEntities: List<MessageEntity> = emptyList(), disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<MessageId>
Use this method to copy messages of any kind.
createNewStickerSet
Link copied to clipboard
common
suspend fun TelegramBotApiClient.createNewStickerSet(requestBody: CreateNewStickerSetRequest): TelegramResponse<Boolean>
Use this method to create a new sticker set owned by a user.
suspend fun TelegramBotApiClient.createNewStickerSet(userId: Int, name: String, title: String, pngSticker: String? = null, tgsSticker: String? = null, emojis: String, containsMasks: Boolean = false, maskPosition: MaskPosition? = null): TelegramResponse<Boolean>
Use this method to create a new sticker set owned by a user.
deleteChatPhoto
Link copied to clipboard
common
suspend fun TelegramBotApiClient.deleteChatPhoto(requestBody: DeleteChatPhotoRequest): TelegramResponse<Boolean>
Use this method to delete a chat photo.
suspend fun TelegramBotApiClient.deleteChatPhoto(chatId: Int): TelegramResponse<Boolean>
Use this method to delete a chat photo.
deleteChatStickerSet
Link copied to clipboard
common
Use this method to delete a group sticker set from a supergroup.
suspend fun TelegramBotApiClient.deleteChatStickerSet(chatId: Int): TelegramResponse<Boolean>
Use this method to delete a group sticker set from a supergroup.
deleteMessage
Link copied to clipboard
common
suspend fun TelegramBotApiClient.deleteMessage(requestBody: DeleteMessageRequest): TelegramResponse<Boolean>
Use this method to delete a message, including service messages, with the following limitations: - A message can only be deleted if it was sent less than 48 hours ago.
suspend fun TelegramBotApiClient.deleteMessage(chatId: Int, messageId: Int): TelegramResponse<Boolean>
Use this method to delete a message, including service messages, with the following limitations: - A message can only be deleted if it was sent less than 48 hours ago.
deleteStickerFromSet
Link copied to clipboard
common
Use this method to delete a sticker from a set created by the bot.
suspend fun TelegramBotApiClient.deleteStickerFromSet(sticker: String): TelegramResponse<Boolean>
Use this method to delete a sticker from a set created by the bot.
deleteWebhook
Link copied to clipboard
common
suspend fun TelegramBotApiClient.deleteWebhook(requestBody: DeleteWebhookRequest): TelegramResponse<Boolean>
Use this method to remove webhook integration if you decide to switch back to getUpdates.
suspend fun TelegramBotApiClient.deleteWebhook(dropPendingUpdates: Boolean = false): TelegramResponse<Boolean>
Use this method to remove webhook integration if you decide to switch back to getUpdates.
editMessageCaption
Link copied to clipboard
common
suspend fun TelegramBotApiClient.editMessageCaption(requestBody: EditMessageCaptionRequest): TelegramResponse<Message>
Use this method to edit captions of messages.
suspend fun TelegramBotApiClient.editMessageCaption(chatId: Int? = null, messageId: Int? = null, inlineMessageId: String? = null, caption: String? = null, parseMode: String? = null, captionEntities: List<MessageEntity> = emptyList(), replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Message>
Use this method to edit captions of messages.
editMessageLiveLocation
Link copied to clipboard
common
Use this method to edit live location messages.
suspend fun TelegramBotApiClient.editMessageLiveLocation(chatId: Int? = null, messageId: Int? = null, inlineMessageId: String? = null, latitude: Float, longitude: Float, horizontalAccuracy: Float? = null, heading: Int? = null, proximityAlertRadius: Int? = null, replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Message>
Use this method to edit live location messages.
editMessageMedia
Link copied to clipboard
common
suspend fun TelegramBotApiClient.editMessageMedia(requestBody: EditMessageMediaRequest): TelegramResponse<Message>
Use this method to edit animation, audio, document, photo, or video messages.
suspend fun TelegramBotApiClient.editMessageMedia(chatId: Int? = null, messageId: Int? = null, inlineMessageId: String? = null, media: InputMedia, replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Message>
Use this method to edit animation, audio, document, photo, or video messages.
editMessageReplyMarkup
Link copied to clipboard
common
Use this method to edit only the reply markup of messages.
suspend fun TelegramBotApiClient.editMessageReplyMarkup(chatId: Int? = null, messageId: Int? = null, inlineMessageId: String? = null, replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Message>
Use this method to edit only the reply markup of messages.
editMessageText
Link copied to clipboard
common
suspend fun TelegramBotApiClient.editMessageText(requestBody: EditMessageTextRequest): TelegramResponse<Message>
Use this method to edit text and game messages.
suspend fun TelegramBotApiClient.editMessageText(chatId: Int? = null, messageId: Int? = null, inlineMessageId: String? = null, text: String, parseMode: String? = null, entities: List<MessageEntity> = emptyList(), disableWebPagePreview: Boolean = false, replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Message>
Use this method to edit text and game messages.
exportChatInviteLink
Link copied to clipboard
common
Use this method to generate a new invite link for a chat; any previously generated link is revoked.
suspend fun TelegramBotApiClient.exportChatInviteLink(chatId: Int): TelegramResponse<String>
Use this method to generate a new invite link for a chat; any previously generated link is revoked.
forwardMessage
Link copied to clipboard
common
suspend fun TelegramBotApiClient.forwardMessage(requestBody: ForwardMessageRequest): TelegramResponse<Message>
Use this method to forward messages of any kind.
suspend fun TelegramBotApiClient.forwardMessage(chatId: Int, fromChatId: Int, disableNotification: Boolean = false, messageId: Int): TelegramResponse<Message>
Use this method to forward messages of any kind.
getChat
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getChat(requestBody: GetChatRequest): TelegramResponse<Chat>
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.).
suspend fun TelegramBotApiClient.getChat(chatId: Int): TelegramResponse<Chat>
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.).
getChatAdministrators
Link copied to clipboard
common
Use this method to get a list of administrators in a chat.
suspend fun TelegramBotApiClient.getChatAdministrators(chatId: Int): TelegramResponse<List<ChatMember>>
Use this method to get a list of administrators in a chat.
getChatMember
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getChatMember(requestBody: GetChatMemberRequest): TelegramResponse<ChatMember>
Use this method to get information about a member of a chat.
suspend fun TelegramBotApiClient.getChatMember(chatId: Int, userId: Int): TelegramResponse<ChatMember>
Use this method to get information about a member of a chat.
getChatMembersCount
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getChatMembersCount(requestBody: GetChatMembersCountRequest): TelegramResponse<Int>
Use this method to get the number of members in a chat.
suspend fun TelegramBotApiClient.getChatMembersCount(chatId: Int): TelegramResponse<Int>
Use this method to get the number of members in a chat.
getFile
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getFile(requestBody: GetFileRequest): TelegramResponse<File>
Use this method to get basic info about a file and prepare it for downloading.
suspend fun TelegramBotApiClient.getFile(fileId: String): TelegramResponse<File>
Use this method to get basic info about a file and prepare it for downloading.
getGameHighScores
Link copied to clipboard
common
Use this method to get data for high score tables.
suspend fun TelegramBotApiClient.getGameHighScores(userId: Int, chatId: Int? = null, messageId: Int? = null, inlineMessageId: String? = null): TelegramResponse<List<GameHighScore>>
Use this method to get data for high score tables.
getMe
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getMe(): TelegramResponse<User>
A simple method for testing your bot's auth token.
getMyCommands
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getMyCommands(): TelegramResponse<List<BotCommand>>
Use this method to get the current list of the bot's commands.
getStickerSet
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getStickerSet(requestBody: GetStickerSetRequest): TelegramResponse<StickerSet>
Use this method to get a sticker set.
suspend fun TelegramBotApiClient.getStickerSet(name: String): TelegramResponse<StickerSet>
Use this method to get a sticker set.
getUpdates
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getUpdates(requestBody: GetUpdatesRequest): TelegramResponse<List<Update>>
Use this method to receive incoming updates using long polling (wiki).
suspend fun TelegramBotApiClient.getUpdates(offset: Int? = null, limit: Int? = null, timeout: Int? = null, allowedUpdates: List<String> = emptyList()): TelegramResponse<List<Update>>
Use this method to receive incoming updates using long polling (wiki).
getUserProfilePhotos
Link copied to clipboard
common
Use this method to get a list of profile pictures for a user.
suspend fun TelegramBotApiClient.getUserProfilePhotos(userId: Int, offset: Int? = null, limit: Int? = null): TelegramResponse<UserProfilePhotos>
Use this method to get a list of profile pictures for a user.
getWebhookInfo
Link copied to clipboard
common
suspend fun TelegramBotApiClient.getWebhookInfo(): TelegramResponse<WebhookInfo>
Use this method to get current webhook status.
kickChatMember
Link copied to clipboard
common
suspend fun TelegramBotApiClient.kickChatMember(requestBody: KickChatMemberRequest): TelegramResponse<Boolean>
Use this method to kick a user from a group, a supergroup or a channel.
suspend fun TelegramBotApiClient.kickChatMember(chatId: Int, userId: Int, untilDate: Int? = null): TelegramResponse<Boolean>
Use this method to kick a user from a group, a supergroup or a channel.
leaveChat
Link copied to clipboard
common
suspend fun TelegramBotApiClient.leaveChat(requestBody: LeaveChatRequest): TelegramResponse<Boolean>
Use this method for your bot to leave a group, supergroup or channel.
suspend fun TelegramBotApiClient.leaveChat(chatId: Int): TelegramResponse<Boolean>
Use this method for your bot to leave a group, supergroup or channel.
logOut
Link copied to clipboard
common
suspend fun TelegramBotApiClient.logOut(): TelegramResponse<Boolean>
Use this method to log out from the cloud Bot API server before launching the bot locally.
pinChatMessage
Link copied to clipboard
common
suspend fun TelegramBotApiClient.pinChatMessage(requestBody: PinChatMessageRequest): TelegramResponse<Boolean>
Use this method to add a message to the list of pinned messages in a chat.
suspend fun TelegramBotApiClient.pinChatMessage(chatId: Int, messageId: Int, disableNotification: Boolean = false): TelegramResponse<Boolean>
Use this method to add a message to the list of pinned messages in a chat.
promoteChatMember
Link copied to clipboard
common
suspend fun TelegramBotApiClient.promoteChatMember(requestBody: PromoteChatMemberRequest): TelegramResponse<Boolean>
Use this method to promote or demote a user in a supergroup or a channel.
suspend fun TelegramBotApiClient.promoteChatMember(chatId: Int, userId: Int, isAnonymous: Boolean = false, canChangeInfo: Boolean = false, canPostMessages: Boolean = false, canEditMessages: Boolean = false, canDeleteMessages: Boolean = false, canInviteUsers: Boolean = false, canRestrictMembers: Boolean = false, canPinMessages: Boolean = false, canPromoteMembers: Boolean = false): TelegramResponse<Boolean>
Use this method to promote or demote a user in a supergroup or a channel.
restrictChatMember
Link copied to clipboard
common
suspend fun TelegramBotApiClient.restrictChatMember(requestBody: RestrictChatMemberRequest): TelegramResponse<Boolean>
Use this method to restrict a user in a supergroup.
suspend fun TelegramBotApiClient.restrictChatMember(chatId: Int, userId: Int, permissions: ChatPermissions, untilDate: Int? = null): TelegramResponse<Boolean>
Use this method to restrict a user in a supergroup.
sendAnimation
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendAnimation(requestBody: SendAnimationRequest): TelegramResponse<Message>
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound).
suspend fun TelegramBotApiClient.sendAnimation(chatId: Int, animation: String, duration: Int? = null, width: Int? = null, height: Int? = null, thumb: String? = null, caption: String? = null, parseMode: String? = null, captionEntities: List<MessageEntity> = emptyList(), disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound).
sendAudio
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendAudio(requestBody: SendAudioRequest): TelegramResponse<Message>
Use this method to send audio files, if you want Telegram clients to display them in the music player.
suspend fun TelegramBotApiClient.sendAudio(chatId: Int, audio: String, caption: String? = null, parseMode: String? = null, captionEntities: List<MessageEntity> = emptyList(), duration: Int? = null, performer: String? = null, title: String? = null, thumb: String? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send audio files, if you want Telegram clients to display them in the music player.
sendChatAction
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendChatAction(requestBody: SendChatActionRequest): TelegramResponse<Boolean>
Use this method when you need to tell the user that something is happening on the bot's side.
suspend fun TelegramBotApiClient.sendChatAction(chatId: Int, action: String): TelegramResponse<Boolean>
Use this method when you need to tell the user that something is happening on the bot's side.
sendContact
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendContact(requestBody: SendContactRequest): TelegramResponse<Message>
Use this method to send phone contacts.
suspend fun TelegramBotApiClient.sendContact(chatId: Int, phoneNumber: String, firstName: String, lastName: String? = null, vcard: String? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send phone contacts.
sendDice
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendDice(requestBody: SendDiceRequest): TelegramResponse<Message>
Use this method to send an animated emoji that will display a random value.
suspend fun TelegramBotApiClient.sendDice(chatId: Int, emoji: String? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send an animated emoji that will display a random value.
sendDocument
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendDocument(requestBody: SendDocumentRequest): TelegramResponse<Message>
Use this method to send general files.
suspend fun TelegramBotApiClient.sendDocument(chatId: Int, document: String, thumb: String? = null, caption: String? = null, parseMode: String? = null, captionEntities: List<MessageEntity> = emptyList(), disableContentTypeDetection: Boolean = false, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send general files.
sendGame
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendGame(requestBody: SendGameRequest): TelegramResponse<Message>
Use this method to send a game.
suspend fun TelegramBotApiClient.sendGame(chatId: Int, gameShortName: String, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Message>
Use this method to send a game.
sendInvoice
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendInvoice(requestBody: SendInvoiceRequest): TelegramResponse<Message>
Use this method to send invoices.
suspend fun TelegramBotApiClient.sendInvoice(chatId: Int, title: String, description: String, payload: String, providerToken: String, startParameter: String, currency: String, prices: List<LabeledPrice> = emptyList(), providerData: String? = null, photoUrl: String? = null, photoSize: Int? = null, photoWidth: Int? = null, photoHeight: Int? = null, needName: Boolean = false, needPhoneNumber: Boolean = false, needEmail: Boolean = false, needShippingAddress: Boolean = false, sendPhoneNumberToProvider: Boolean = false, sendEmailToProvider: Boolean = false, isFlexible: Boolean = false, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Message>
Use this method to send invoices.
sendLocation
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendLocation(requestBody: SendLocationRequest): TelegramResponse<Message>
Use this method to send point on the map.
suspend fun TelegramBotApiClient.sendLocation(chatId: Int, latitude: Float, longitude: Float, horizontalAccuracy: Float? = null, livePeriod: Int? = null, heading: Int? = null, proximityAlertRadius: Int? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send point on the map.
sendMediaGroup
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendMediaGroup(requestBody: SendMediaGroupRequest): TelegramResponse<List<Message>>
Use this method to send a group of photos, videos, documents or audios as an album.
suspend fun TelegramBotApiClient.sendMediaGroup(chatId: Int, media: List<InputMedia> = emptyList(), disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false): TelegramResponse<List<Message>>
Use this method to send a group of photos, videos, documents or audios as an album.
sendMessage
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendMessage(requestBody: SendMessageRequest): TelegramResponse<Message>
Use this method to send text messages.
suspend fun TelegramBotApiClient.sendMessage(chatId: Int, text: String, parseMode: String? = null, entities: List<MessageEntity> = emptyList(), disableWebPagePreview: Boolean = false, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send text messages.
sendPhoto
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendPhoto(requestBody: SendPhotoRequest): TelegramResponse<Message>
Use this method to send photos.
suspend fun TelegramBotApiClient.sendPhoto(chatId: Int, photo: String, caption: String? = null, parseMode: String? = null, captionEntities: List<MessageEntity> = emptyList(), disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send photos.
sendPoll
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendPoll(requestBody: SendPollRequest): TelegramResponse<Message>
Use this method to send a native poll.
suspend fun TelegramBotApiClient.sendPoll(chatId: Int, question: String, options: List<String> = emptyList(), isAnonymous: Boolean = false, type: String? = null, allowsMultipleAnswers: Boolean = false, correctOptionId: Int? = null, explanation: String? = null, explanationParseMode: String? = null, explanationEntities: List<MessageEntity> = emptyList(), openPeriod: Int? = null, closeDate: Int? = null, isClosed: Boolean = false, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send a native poll.
sendSticker
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendSticker(requestBody: SendStickerRequest): TelegramResponse<Message>
Use this method to send static .WEBP or animated .TGS stickers.
suspend fun TelegramBotApiClient.sendSticker(chatId: Int, sticker: String, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send static .WEBP or animated .TGS stickers.
sendVenue
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendVenue(requestBody: SendVenueRequest): TelegramResponse<Message>
Use this method to send information about a venue.
suspend fun TelegramBotApiClient.sendVenue(chatId: Int, latitude: Float, longitude: Float, title: String, address: String, foursquareId: String? = null, foursquareType: String? = null, googlePlaceId: String? = null, googlePlaceType: String? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send information about a venue.
sendVideo
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendVideo(requestBody: SendVideoRequest): TelegramResponse<Message>
Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document).
suspend fun TelegramBotApiClient.sendVideo(chatId: Int, video: String, duration: Int? = null, width: Int? = null, height: Int? = null, thumb: String? = null, caption: String? = null, parseMode: String? = null, captionEntities: List<MessageEntity> = emptyList(), supportsStreaming: Boolean = false, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document).
sendVideoNote
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendVideoNote(requestBody: SendVideoNoteRequest): TelegramResponse<Message>
As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.
suspend fun TelegramBotApiClient.sendVideoNote(chatId: Int, videoNote: String, duration: Int? = null, length: Int? = null, thumb: String? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.
sendVoice
Link copied to clipboard
common
suspend fun TelegramBotApiClient.sendVoice(requestBody: SendVoiceRequest): TelegramResponse<Message>
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
suspend fun TelegramBotApiClient.sendVoice(chatId: Int, voice: String, caption: String? = null, parseMode: String? = null, captionEntities: List<MessageEntity> = emptyList(), duration: Int? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): TelegramResponse<Message>
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
setChatAdministratorCustomTitle
Link copied to clipboard
common
Use this method to set a custom title for an administrator in a supergroup promoted by the bot.
suspend fun TelegramBotApiClient.setChatAdministratorCustomTitle(chatId: Int, userId: Int, customTitle: String): TelegramResponse<Boolean>
Use this method to set a custom title for an administrator in a supergroup promoted by the bot.
setChatDescription
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setChatDescription(requestBody: SetChatDescriptionRequest): TelegramResponse<Boolean>
Use this method to change the description of a group, a supergroup or a channel.
suspend fun TelegramBotApiClient.setChatDescription(chatId: Int, description: String? = null): TelegramResponse<Boolean>
Use this method to change the description of a group, a supergroup or a channel.
setChatPermissions
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setChatPermissions(requestBody: SetChatPermissionsRequest): TelegramResponse<Boolean>
Use this method to set default chat permissions for all members.
suspend fun TelegramBotApiClient.setChatPermissions(chatId: Int, permissions: ChatPermissions): TelegramResponse<Boolean>
Use this method to set default chat permissions for all members.
setChatPhoto
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setChatPhoto(requestBody: SetChatPhotoRequest): TelegramResponse<Boolean>
Use this method to set a new profile photo for the chat.
suspend fun TelegramBotApiClient.setChatPhoto(chatId: Int, photo: String): TelegramResponse<Boolean>
Use this method to set a new profile photo for the chat.
setChatStickerSet
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setChatStickerSet(requestBody: SetChatStickerSetRequest): TelegramResponse<Boolean>
Use this method to set a new group sticker set for a supergroup.
suspend fun TelegramBotApiClient.setChatStickerSet(chatId: Int, stickerSetName: String): TelegramResponse<Boolean>
Use this method to set a new group sticker set for a supergroup.
setChatTitle
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setChatTitle(requestBody: SetChatTitleRequest): TelegramResponse<Boolean>
Use this method to change the title of a chat.
suspend fun TelegramBotApiClient.setChatTitle(chatId: Int, title: String): TelegramResponse<Boolean>
Use this method to change the title of a chat.
setGameScore
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setGameScore(requestBody: SetGameScoreRequest): TelegramResponse<Message>
Use this method to set the score of the specified user in a game.
suspend fun TelegramBotApiClient.setGameScore(userId: Int, score: Int, force: Boolean = false, disableEditMessage: Boolean = false, chatId: Int? = null, messageId: Int? = null, inlineMessageId: String? = null): TelegramResponse<Message>
Use this method to set the score of the specified user in a game.
setMyCommands
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setMyCommands(requestBody: SetMyCommandsRequest): TelegramResponse<Boolean>
Use this method to change the list of the bot's commands.
suspend fun TelegramBotApiClient.setMyCommands(commands: List<BotCommand> = emptyList()): TelegramResponse<Boolean>
Use this method to change the list of the bot's commands.
setPassportDataErrors
Link copied to clipboard
common
Informs a user that some of the Telegram Passport elements they provided contains errors.
suspend fun TelegramBotApiClient.setPassportDataErrors(userId: Int, errors: List<PassportElementError> = emptyList()): TelegramResponse<Boolean>
Informs a user that some of the Telegram Passport elements they provided contains errors.
setStickerPositionInSet
Link copied to clipboard
common
Use this method to move a sticker in a set created by the bot to a specific position.
suspend fun TelegramBotApiClient.setStickerPositionInSet(sticker: String, position: Int): TelegramResponse<Boolean>
Use this method to move a sticker in a set created by the bot to a specific position.
setStickerSetThumb
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setStickerSetThumb(requestBody: SetStickerSetThumbRequest): TelegramResponse<Boolean>
Use this method to set the thumbnail of a sticker set.
suspend fun TelegramBotApiClient.setStickerSetThumb(name: String, userId: Int, thumb: String? = null): TelegramResponse<Boolean>
Use this method to set the thumbnail of a sticker set.
setWebhook
Link copied to clipboard
common
suspend fun TelegramBotApiClient.setWebhook(requestBody: SetWebhookRequest): TelegramResponse<Boolean>
Use this method to specify a url and receive incoming updates via an outgoing webhook.
suspend fun TelegramBotApiClient.setWebhook(url: String, certificate: String? = null, ipAddress: String? = null, maxConnections: Int? = null, allowedUpdates: List<String> = emptyList(), dropPendingUpdates: Boolean = false): TelegramResponse<Boolean>
Use this method to specify a url and receive incoming updates via an outgoing webhook.
stopMessageLiveLocation
Link copied to clipboard
common
Use this method to stop updating a live location message before live_period expires.
suspend fun TelegramBotApiClient.stopMessageLiveLocation(chatId: Int? = null, messageId: Int? = null, inlineMessageId: String? = null, replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Message>
Use this method to stop updating a live location message before live_period expires.
stopPoll
Link copied to clipboard
common
suspend fun TelegramBotApiClient.stopPoll(requestBody: StopPollRequest): TelegramResponse<Poll>
Use this method to stop a poll which was sent by the bot.
suspend fun TelegramBotApiClient.stopPoll(chatId: Int, messageId: Int, replyMarkup: InlineKeyboardMarkup? = null): TelegramResponse<Poll>
Use this method to stop a poll which was sent by the bot.
unbanChatMember
Link copied to clipboard
common
suspend fun TelegramBotApiClient.unbanChatMember(requestBody: UnbanChatMemberRequest): TelegramResponse<Boolean>
Use this method to unban a previously kicked user in a supergroup or channel.
suspend fun TelegramBotApiClient.unbanChatMember(chatId: Int, userId: Int, onlyIfBanned: Boolean = false): TelegramResponse<Boolean>
Use this method to unban a previously kicked user in a supergroup or channel.
unpinAllChatMessages
Link copied to clipboard
common
Use this method to clear the list of pinned messages in a chat.
suspend fun TelegramBotApiClient.unpinAllChatMessages(chatId: Int): TelegramResponse<Boolean>
Use this method to clear the list of pinned messages in a chat.
unpinChatMessage
Link copied to clipboard
common
suspend fun TelegramBotApiClient.unpinChatMessage(requestBody: UnpinChatMessageRequest): TelegramResponse<Boolean>
Use this method to remove a message from the list of pinned messages in a chat.
suspend fun TelegramBotApiClient.unpinChatMessage(chatId: Int, messageId: Int? = null): TelegramResponse<Boolean>
Use this method to remove a message from the list of pinned messages in a chat.
uploadStickerFile
Link copied to clipboard
common
suspend fun TelegramBotApiClient.uploadStickerFile(requestBody: UploadStickerFileRequest): TelegramResponse<File>
Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times).
suspend fun TelegramBotApiClient.uploadStickerFile(userId: Int, pngSticker: String): TelegramResponse<File>
Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times).