Package-level declarations

Types

Link copied to clipboard
data class Animation(val fileId: String, val fileUniqueId: String, val width: Int, val height: Int, val duration: Int, val thumbnail: PhotoSize? = null, val fileName: String? = null, val mimeType: String? = null, val fileSize: Long? = null)
Link copied to clipboard
data class Audio(val fileId: String, val fileUniqueId: String, val duration: Int, val performer: String? = null, val title: String? = null, val fileName: String? = null, val mimeType: String? = null, val fileSize: Long? = null, val thumbnail: PhotoSize? = null)
Link copied to clipboard
data class BotCommand(val command: String, val description: String)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "chat_member")
data class BotCommandScopeChatMember(val chatId: ChatId, val userId: Int) : BotCommandScope
Link copied to clipboard
data class BotDescription(val description: String)
Link copied to clipboard
data class BotName(val name: String)
Link copied to clipboard
Link copied to clipboard
data class CallbackQuery(val id: String, val from: User, val message: MaybeInaccessibleMessage? = null, val inlineMessageId: String? = null, val chatInstance: String, val data: String? = null, val gameShortName: String? = null)
Link copied to clipboard
data class Chat(val id: Long, val type: String, val title: String? = null, val username: String? = null, val firstName: String? = null, val lastName: String? = null, val isForum: Boolean? = null, val photo: ChatPhoto? = null, val activeUsernames: List<String>? = null, val availableReactions: List<ReactionType>? = null, val accentColorId: Int? = null, val backgroundCustomEmojiId: String? = null, val profileAccentColorId: Int? = null, val profileBackgroundCustomEmojiId: String? = null, val emojiStatusCustomEmojiId: String? = null, val emojiStatusExpirationDate: Int? = null, val bio: String? = null, val hasPrivateForwards: Boolean? = null, val hasRestrictedVoiceAndVideoMessages: Boolean? = null, val joinToSendMessages: Boolean? = null, val joinByRequest: Boolean? = null, val description: String? = null, val inviteLink: String? = null, val pinnedMessage: Message? = null, val permissions: ChatPermissions? = null, val slowModeDelay: Int? = null, val unrestrictBoostCount: Int? = null, val messageAutoDeleteTime: Int? = null, val hasAggressiveAntiSpamEnabled: Boolean? = null, val hasHiddenMembers: Boolean? = null, val hasProtectedContent: Boolean? = null, val hasVisibleHistory: Boolean? = null, val stickerSetName: String? = null, val canSetStickerSet: Boolean? = null, val customEmojiStickerSetName: String? = null, val linkedChatId: Int? = null, val location: ChatLocation? = null)
Link copied to clipboard
data class ChatAdministratorRights(val isAnonymous: Boolean, val canManageChat: Boolean, val canDeleteMessages: Boolean, val canManageVideoChats: Boolean, val canRestrictMembers: Boolean, val canPromoteMembers: Boolean, val canChangeInfo: Boolean, val canInviteUsers: Boolean, val canPostStories: Boolean, val canEditStories: Boolean, val canDeleteStories: Boolean, val canPostMessages: Boolean? = null, val canEditMessages: Boolean? = null, val canPinMessages: Boolean? = null, val canManageTopics: Boolean? = null)
Link copied to clipboard
data class ChatBoost(val boostId: String, val addDate: Int, val expirationDate: Int, val source: ChatBoostSource)
Link copied to clipboard
data class ChatBoostAdded(val boostCount: Int)
Link copied to clipboard
data class ChatBoostRemoved(val chat: Chat, val boostId: String, val removeDate: Int, val source: ChatBoostSource)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "giveaway")
data class ChatBoostSourceGiveaway(val giveawayMessageId: Int, val user: User? = null, val isUnclaimed: Boolean? = null) : ChatBoostSource
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A Chat id that can be either Long or String. If it's a string, it should start with '@'.

Link copied to clipboard

The serializer of ChatId. It is only recommended for deserialization scenarios.

Link copied to clipboard
data class ChatInviteLink(val inviteLink: String, val creator: User, val createsJoinRequest: Boolean, val isPrimary: Boolean, val isRevoked: Boolean, val name: String? = null, val expireDate: Int? = null, val memberLimit: Int? = null, val pendingJoinRequestCount: Int? = null)
Link copied to clipboard
data class ChatJoinRequest(val chat: Chat, val from: User, val userChatId: Long, val date: Int, val bio: String? = null, val inviteLink: ChatInviteLink? = null)
Link copied to clipboard
data class ChatLocation(val location: Location, val address: String)
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "administrator")
data class ChatMemberAdministrator(val user: User, val canBeEdited: Boolean, val isAnonymous: Boolean, val canManageChat: Boolean, val canDeleteMessages: Boolean, val canManageVideoChats: Boolean, val canRestrictMembers: Boolean, val canPromoteMembers: Boolean, val canChangeInfo: Boolean, val canInviteUsers: Boolean, val canPostStories: Boolean, val canEditStories: Boolean, val canDeleteStories: Boolean, val canPostMessages: Boolean? = null, val canEditMessages: Boolean? = null, val canPinMessages: Boolean? = null, val canManageTopics: Boolean? = null, val customTitle: String? = null) : ChatMember
Link copied to clipboard
@SerialName(value = "kicked")
data class ChatMemberBanned(val user: User, val untilDate: Int) : ChatMember
Link copied to clipboard
@SerialName(value = "left")
data class ChatMemberLeft(val user: User) : ChatMember
Link copied to clipboard
@SerialName(value = "member")
data class ChatMemberMember(val user: User) : ChatMember
Link copied to clipboard
@SerialName(value = "creator")
data class ChatMemberOwner(val user: User, val isAnonymous: Boolean, val customTitle: String? = null) : ChatMember
Link copied to clipboard
@SerialName(value = "restricted")
data class ChatMemberRestricted(val user: User, val isMember: Boolean, val canSendMessages: Boolean, val canSendAudios: Boolean, val canSendDocuments: Boolean, val canSendPhotos: Boolean, val canSendVideos: Boolean, val canSendVideoNotes: Boolean, val canSendVoiceNotes: Boolean, val canSendPolls: Boolean, val canSendOtherMessages: Boolean, val canAddWebPagePreviews: Boolean, val canChangeInfo: Boolean, val canInviteUsers: Boolean, val canPinMessages: Boolean, val canManageTopics: Boolean, val untilDate: Int) : ChatMember
Link copied to clipboard
data class ChatMemberUpdated(val chat: Chat, val from: User, val date: Int, val oldChatMember: ChatMember, val newChatMember: ChatMember, val inviteLink: ChatInviteLink? = null, val viaChatFolderInviteLink: Boolean? = null)
Link copied to clipboard
data class ChatPermissions(val canSendMessages: Boolean? = null, val canSendAudios: Boolean? = null, val canSendDocuments: Boolean? = null, val canSendPhotos: Boolean? = null, val canSendVideos: Boolean? = null, val canSendVideoNotes: Boolean? = null, val canSendVoiceNotes: Boolean? = null, val canSendPolls: Boolean? = null, val canSendOtherMessages: Boolean? = null, val canAddWebPagePreviews: Boolean? = null, val canChangeInfo: Boolean? = null, val canInviteUsers: Boolean? = null, val canPinMessages: Boolean? = null, val canManageTopics: Boolean? = null)
Link copied to clipboard
data class ChatPhoto(val smallFileId: String, val smallFileUniqueId: String, val bigFileId: String, val bigFileUniqueId: String)
Link copied to clipboard
data class ChatShared(val requestId: Int, val chatId: Long)
Link copied to clipboard

Type of chat, can be either private, group, supergroup or channel

Link copied to clipboard
data class Contact(val phoneNumber: String, val firstName: String, val lastName: String? = null, val userId: Long? = null, val vcard: String? = null)
Link copied to clipboard
data class Dice(val emoji: String, val value: Int)
Link copied to clipboard
data class Document(val fileId: String, val fileUniqueId: String, val thumbnail: PhotoSize? = null, val fileName: String? = null, val mimeType: String? = null, val fileSize: Long? = null)
Link copied to clipboard
data class ExternalReplyInfo(val origin: MessageOrigin, val chat: Chat? = null, val messageId: Int? = null, val linkPreviewOptions: LinkPreviewOptions? = null, val animation: Animation? = null, val audio: Audio? = null, val document: Document? = null, val photo: List<PhotoSize>? = null, val sticker: Sticker? = null, val story: Story? = null, val video: Video? = null, val videoNote: VideoNote? = null, val voice: Voice? = null, val hasMediaSpoiler: Boolean? = null, val contact: Contact? = null, val dice: Dice? = null, val game: Game? = null, val giveaway: Giveaway? = null, val giveawayWinners: GiveawayWinners? = null, val invoice: Invoice? = null, val location: Location? = null, val poll: Poll? = null, val venue: Venue? = null)
Link copied to clipboard
data class File(val fileId: String, val fileUniqueId: String, val fileSize: Long? = null, val filePath: String? = null)
Link copied to clipboard
data class ForceReply(val forceReply: Boolean = false, val inputFieldPlaceholder: String? = null, val selective: Boolean? = null)
Link copied to clipboard
Link copied to clipboard
data class ForumTopic(val messageThreadId: Int, val name: String, val iconColor: Int, val iconCustomEmojiId: String? = null)
Link copied to clipboard
data class ForumTopicCreated(val name: String, val iconColor: Int, val iconCustomEmojiId: String? = null)
Link copied to clipboard
data class ForumTopicEdited(val name: String? = null, val iconCustomEmojiId: String? = null)
Link copied to clipboard
data class Giveaway(val chats: List<Chat> = emptyList(), val winnersSelectionDate: Int, val winnerCount: Int, val onlyNewMembers: Boolean? = null, val hasPublicWinners: Boolean? = null, val prizeDescription: String? = null, val countryCodes: List<String>? = null, val premiumSubscriptionMonthCount: Int? = null)
Link copied to clipboard
data class GiveawayCompleted(val winnerCount: Int, val unclaimedPrizeCount: Int? = null, val giveawayMessage: Message? = null)
Link copied to clipboard
data class GiveawayWinners(val chat: Chat, val giveawayMessageId: Int, val winnersSelectionDate: Int, val winnerCount: Int, val winners: List<User> = emptyList(), val additionalChatCount: Int? = null, val premiumSubscriptionMonthCount: Int? = null, val unclaimedPrizeCount: Int? = null, val onlyNewMembers: Boolean? = null, val wasRefunded: Boolean? = null, val prizeDescription: String? = null)
Link copied to clipboard
data class InaccessibleMessage(val chat: Chat, val messageId: Int, val date: Int)
Link copied to clipboard
data class InlineKeyboardButton(val text: String, val url: String? = null, val callbackData: String? = null, val webApp: WebAppInfo? = null, val loginUrl: LoginUrl? = null, val switchInlineQuery: String? = null, val switchInlineQueryCurrentChat: String? = null, val switchInlineQueryChosenChat: SwitchInlineQueryChosenChat? = null, val callbackGame: CallbackGame? = null, val pay: Boolean? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "animation")
data class InputMediaAnimation(val media: String, val thumbnail: String? = null, val caption: String? = null, val parseMode: String? = null, val captionEntities: List<MessageEntity>? = null, val width: Int? = null, val height: Int? = null, val duration: Int? = null, val hasSpoiler: Boolean? = null) : InputMedia
Link copied to clipboard
@SerialName(value = "audio")
data class InputMediaAudio(val media: String, val thumbnail: String? = null, val caption: String? = null, val parseMode: String? = null, val captionEntities: List<MessageEntity>? = null, val duration: Int? = null, val performer: String? = null, val title: String? = null) : InputMedia
Link copied to clipboard
@SerialName(value = "document")
data class InputMediaDocument(val media: String, val thumbnail: String? = null, val caption: String? = null, val parseMode: String? = null, val captionEntities: List<MessageEntity>? = null, val disableContentTypeDetection: Boolean? = null) : InputMedia
Link copied to clipboard
@SerialName(value = "photo")
data class InputMediaPhoto(val media: String, val caption: String? = null, val parseMode: String? = null, val captionEntities: List<MessageEntity>? = null, val hasSpoiler: Boolean? = null) : InputMedia
Link copied to clipboard
@SerialName(value = "video")
data class InputMediaVideo(val type: String, val media: String, val thumbnail: String? = null, val caption: String? = null, val parseMode: String? = null, val captionEntities: List<MessageEntity>? = null, val width: Int? = null, val height: Int? = null, val duration: Int? = null, val supportsStreaming: Boolean? = null, val hasSpoiler: Boolean? = null) : InputMedia
Link copied to clipboard
data class KeyboardButton(val text: String, val requestUsers: KeyboardButtonRequestUsers? = null, val requestChat: KeyboardButtonRequestChat? = null, val requestContact: Boolean? = null, val requestLocation: Boolean? = null, val requestPoll: KeyboardButtonPollType? = null, val webApp: WebAppInfo? = null)
Link copied to clipboard
Link copied to clipboard
data class KeyboardButtonRequestChat(val requestId: Int, val chatIsChannel: Boolean, val chatIsForum: Boolean? = null, val chatHasUsername: Boolean? = null, val chatIsCreated: Boolean? = null, val userAdministratorRights: ChatAdministratorRights? = null, val botAdministratorRights: ChatAdministratorRights? = null, val botIsMember: Boolean? = null)
Link copied to clipboard
data class KeyboardButtonRequestUsers(val requestId: Int, val userIsBot: Boolean? = null, val userIsPremium: Boolean? = null, val maxQuantity: Int? = null)
Link copied to clipboard
data class LinkPreviewOptions(val isDisabled: Boolean? = null, val url: String? = null, val preferSmallMedia: Boolean? = null, val preferLargeMedia: Boolean? = null, val showAboveText: Boolean? = null)
Link copied to clipboard
Link copied to clipboard
data class Location(val latitude: Float, val longitude: Float, val horizontalAccuracy: Float? = null, val livePeriod: Int? = null, val heading: Int? = null, val proximityAlertRadius: Int? = null)
Link copied to clipboard
data class LoginUrl(val url: String, val forwardText: String? = null, val botUsername: String? = null, val requestWriteAccess: Boolean? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "web_app")
data class MenuButtonWebApp(val text: String, val webApp: WebAppInfo) : MenuButton
Link copied to clipboard
data class Message(val messageId: Int, val messageThreadId: Int? = null, val from: User? = null, val senderChat: Chat? = null, val senderBoostCount: Int? = null, val date: Int, val chat: Chat, val forwardOrigin: MessageOrigin? = null, val isTopicMessage: Boolean? = null, val isAutomaticForward: Boolean? = null, val replyToMessage: Message? = null, val externalReply: ExternalReplyInfo? = null, val quote: TextQuote? = null, val replyToStory: Story? = null, val viaBot: User? = null, val editDate: Int? = null, val hasProtectedContent: Boolean? = null, val mediaGroupId: String? = null, val authorSignature: String? = null, val text: String? = null, val entities: List<MessageEntity>? = null, val linkPreviewOptions: LinkPreviewOptions? = null, val animation: Animation? = null, val audio: Audio? = null, val document: Document? = null, val photo: List<PhotoSize>? = null, val sticker: Sticker? = null, val story: Story? = null, val video: Video? = null, val videoNote: VideoNote? = null, val voice: Voice? = null, val caption: String? = null, val captionEntities: List<MessageEntity>? = null, val hasMediaSpoiler: Boolean? = null, val contact: Contact? = null, val dice: Dice? = null, val game: Game? = null, val poll: Poll? = null, val venue: Venue? = null, val location: Location? = null, val newChatMembers: List<User>? = null, val leftChatMember: User? = null, val newChatTitle: String? = null, val newChatPhoto: List<PhotoSize>? = null, val deleteChatPhoto: Boolean? = null, val groupChatCreated: Boolean? = null, val supergroupChatCreated: Boolean? = null, val channelChatCreated: Boolean? = null, val messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged? = null, val migrateToChatId: Long? = null, val migrateFromChatId: Long? = null, val pinnedMessage: MaybeInaccessibleMessage? = null, val invoice: Invoice? = null, val successfulPayment: SuccessfulPayment? = null, val usersShared: UsersShared? = null, val chatShared: ChatShared? = null, val connectedWebsite: String? = null, val writeAccessAllowed: WriteAccessAllowed? = null, val passportData: PassportData? = null, val proximityAlertTriggered: ProximityAlertTriggered? = null, val boostAdded: ChatBoostAdded? = null, val forumTopicCreated: ForumTopicCreated? = null, val forumTopicEdited: ForumTopicEdited? = null, val forumTopicClosed: ForumTopicClosed? = null, val forumTopicReopened: ForumTopicReopened? = null, val generalForumTopicHidden: GeneralForumTopicHidden? = null, val generalForumTopicUnhidden: GeneralForumTopicUnhidden? = null, val giveawayCreated: GiveawayCreated? = null, val giveaway: Giveaway? = null, val giveawayWinners: GiveawayWinners? = null, val giveawayCompleted: GiveawayCompleted? = null, val videoChatScheduled: VideoChatScheduled? = null, val videoChatStarted: VideoChatStarted? = null, val videoChatEnded: VideoChatEnded? = null, val videoChatParticipantsInvited: VideoChatParticipantsInvited? = null, val webAppData: WebAppData? = null, val replyMarkup: InlineKeyboardMarkup? = null)
Link copied to clipboard
Link copied to clipboard
data class MessageEntity(val type: String, val offset: Int, val length: Int, val url: String? = null, val user: User? = null, val language: String? = null, val customEmojiId: String? = null)
Link copied to clipboard
Link copied to clipboard
data class MessageId(val messageId: Int)
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "channel")
data class MessageOriginChannel(val date: Int, val chat: Chat, val messageId: Int, val authorSignature: String? = null) : MessageOrigin
Link copied to clipboard
@SerialName(value = "chat")
data class MessageOriginChat(val date: Int, val senderChat: Chat, val authorSignature: String? = null) : MessageOrigin
Link copied to clipboard
@SerialName(value = "hidden_user")
data class MessageOriginHiddenUser(val date: Int, val senderUserName: String) : MessageOrigin
Link copied to clipboard
@SerialName(value = "user")
data class MessageOriginUser(val date: Int, val senderUser: User) : MessageOrigin
Link copied to clipboard
data class MessageReactionCountUpdated(val chat: Chat, val messageId: Int, val date: Int, val reactions: List<ReactionCount> = emptyList())
Link copied to clipboard
data class MessageReactionUpdated(val chat: Chat, val messageId: Int, val user: User? = null, val actorChat: Chat? = null, val date: Int, val oldReaction: List<ReactionType> = emptyList(), val newReaction: List<ReactionType> = emptyList())
Link copied to clipboard
data class PhotoSize(val fileId: String, val fileUniqueId: String, val width: Int, val height: Int, val fileSize: Int? = null)
Link copied to clipboard
data class Poll(val id: String, val question: String, val options: List<PollOption> = emptyList(), val totalVoterCount: Int, val isClosed: Boolean, val isAnonymous: Boolean, val type: String, val allowsMultipleAnswers: Boolean, val correctOptionId: Int? = null, val explanation: String? = null, val explanationEntities: List<MessageEntity>? = null, val openPeriod: Int? = null, val closeDate: Int? = null)
Link copied to clipboard
data class PollAnswer(val pollId: String, val voterChat: Chat? = null, val user: User? = null, val optionIds: List<Int> = emptyList())
Link copied to clipboard
data class PollOption(val text: String, val voterCount: Int)
Link copied to clipboard
data class ProximityAlertTriggered(val traveler: User, val watcher: User, val distance: Int)
Link copied to clipboard
data class ReactionCount(val type: ReactionType, val totalCount: Int)
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "custom_emoji")
data class ReactionTypeCustomEmoji(val customEmojiId: String) : ReactionType
Link copied to clipboard
Link copied to clipboard
data class ReplyKeyboardMarkup(val keyboard: List<List<KeyboardButton>> = emptyList(), val isPersistent: Boolean? = null, val resizeKeyboard: Boolean? = null, val oneTimeKeyboard: Boolean? = null, val inputFieldPlaceholder: String? = null, val selective: Boolean? = null)
Link copied to clipboard
data class ReplyKeyboardRemove(val removeKeyboard: Boolean = false, val selective: Boolean? = null)
Link copied to clipboard
data class ReplyParameters(val messageId: Int, val chatId: ChatId? = null, val allowSendingWithoutReply: Boolean? = null, val quote: String? = null, val quoteParseMode: String? = null, val quoteEntities: List<MessageEntity>? = null, val quotePosition: Int? = null)
Link copied to clipboard
data class ResponseParameters(val migrateToChatId: Long? = null, val retryAfter: Int? = null)
Link copied to clipboard
data class Story(val chat: Chat, val id: Int)
Link copied to clipboard
data class SwitchInlineQueryChosenChat(val query: String? = null, val allowUserChats: Boolean? = null, val allowBotChats: Boolean? = null, val allowGroupChats: Boolean? = null, val allowChannelChats: Boolean? = null)
Link copied to clipboard
data class TextQuote(val text: String, val entities: List<MessageEntity>? = null, val position: Int, val isManual: Boolean? = null)
Link copied to clipboard
data class User(val id: Long, val isBot: Boolean = false, val firstName: String, val lastName: String? = null, val username: String? = null, val languageCode: String? = null, val isPremium: Boolean? = null, val addedToAttachmentMenu: Boolean? = null, val canJoinGroups: Boolean? = null, val canReadAllGroupMessages: Boolean? = null, val supportsInlineQueries: Boolean? = null)
Link copied to clipboard
data class UserChatBoosts(val boosts: List<ChatBoost> = emptyList())
Link copied to clipboard
data class UserProfilePhotos(val totalCount: Int, val photos: List<List<PhotoSize>> = emptyList())
Link copied to clipboard
data class UsersShared(val requestId: Int, val userIds: List<Long> = emptyList())
Link copied to clipboard
data class Venue(val location: Location, val title: String, val address: String, val foursquareId: String? = null, val foursquareType: String? = null, val googlePlaceId: String? = null, val googlePlaceType: String? = null)
Link copied to clipboard
data class Video(val fileId: String, val fileUniqueId: String, val width: Int, val height: Int, val duration: Int, val thumbnail: PhotoSize? = null, val fileName: String? = null, val mimeType: String? = null, val fileSize: Long? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class VideoNote(val fileId: String, val fileUniqueId: String, val length: Int, val duration: Int, val thumbnail: PhotoSize? = null, val fileSize: Int? = null)
Link copied to clipboard
data class Voice(val fileId: String, val fileUniqueId: String, val duration: Int, val mimeType: String? = null, val fileSize: Long? = null)
Link copied to clipboard
data class WebAppData(val data: String, val buttonText: String)
Link copied to clipboard
Link copied to clipboard
data class WriteAccessAllowed(val fromRequest: Boolean? = null, val webAppName: String? = null, val fromAttachmentMenu: Boolean? = null)

Functions

Link copied to clipboard
@JvmName(name = "valueOf")
fun ChatId(value: Long): ChatId

Create a ChatId by Long.

@JvmName(name = "valueOf")
fun ChatId(value: String): ChatId

Create a ChatId by String.