1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

Merge pull request #839 from InsanusMokrassar/11.0.0

11.0.0
This commit is contained in:
InsanusMokrassar 2024-03-18 13:52:46 +06:00 committed by GitHub
commit fdc007f609
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
190 changed files with 3824 additions and 3330 deletions

View File

@ -1,5 +1,26 @@
# TelegramBotAPI changelog # TelegramBotAPI changelog
## 11.0.0
**THIS UPDATE CONTAINS REMOVES OF DEPRECATED THINGS**
* `Core`:
* `MessageId` now is `value class`. `MessageIdentifier` become deprecated
* `MessageThreadId` now is `value class`
* `InlineQueryIdentifier` now is `value class`
* `MediaGroupIdentifier` has been renamed to `MediaGroupId` and now is `value class`
* `CallbackQueryIdentifier` has been renamed to `CallbackQueryId` and now is `value class`
* `WebAppQueryId` now is `value class`
* `PreCheckoutQueryId` now is `value class`
* `FileUniqueId` has been renamed to `TgFileUniqueId` and now is `value class`
* `UpdateIdentifier` has been renamed to `UpdateId` and now is `value class`
* `InlineMessageIdentifier` has been renamed to `InlineMessageId` and now is `value class`
* `ShippingQueryIdentifier` has been renamed to `ShippingQueryId` and now is `value class`
* `Identifier` has been renamed to `RawChatId` and now is `value class`
* `ShippingOptionIdentifier` has been renamed to `ShippingOptionId` and now is `value class`
* `PollIdentifier` has been renamed to `PollId` and now is `value class`
* `StickerSetName` now is `value class`
## 10.1.2 ## 10.1.2
* `Version`: * `Version`:

View File

@ -6,4 +6,4 @@ kotlin.incremental=true
kotlin.incremental.js=true kotlin.incremental.js=true
library_group=dev.inmo library_group=dev.inmo
library_version=10.1.2 library_version=11.0.0

File diff suppressed because it is too large Load Diff

View File

@ -27,15 +27,6 @@ suspend fun TelegramBot.deleteMessages(
messageIds = messageIds.toList() messageIds = messageIds.toList()
) )
suspend fun TelegramBot.deleteMessages(
chatId: ChatIdentifier,
firstMessageId: MessageId,
vararg messageIds: MessageId
) = deleteMessages(
chatId = chatId,
messageIds = (listOf(firstMessageId) + messageIds.toList())
)
suspend fun TelegramBot.deleteMessages( suspend fun TelegramBot.deleteMessages(
messagesMetas: List<Message.MetaInfo> messagesMetas: List<Message.MetaInfo>
) = messagesMetas.groupBy { it.chatId }.map { (chatId, messages) -> ) = messagesMetas.groupBy { it.chatId }.map { (chatId, messages) ->
@ -60,14 +51,6 @@ suspend fun TelegramBot.delete(
messageIds: Array<MessageId> messageIds: Array<MessageId>
) = deleteMessages(chatId = chatId, messageIds = messageIds) ) = deleteMessages(chatId = chatId, messageIds = messageIds)
suspend fun TelegramBot.delete(
chatId: ChatIdentifier,
firstMessageId: MessageId,
secondMessageId: MessageId,
vararg messageIds: MessageId
) = deleteMessages(chatId = chatId, messageIds = (listOf(firstMessageId, secondMessageId) + messageIds.toList()))
suspend fun TelegramBot.delete( suspend fun TelegramBot.delete(
messagesMetas: List<Message.MetaInfo> messagesMetas: List<Message.MetaInfo>
) = deleteMessages(messagesMetas) ) = deleteMessages(messagesMetas)

View File

@ -48,25 +48,6 @@ suspend fun TelegramBot.forwardMessages(
removeCaption = removeCaption removeCaption = removeCaption
) )
suspend fun TelegramBot.forwardMessages(
toChatId: ChatIdentifier,
fromChatId: ChatIdentifier,
firstMessageId: MessageId,
vararg messageIds: MessageId,
threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
removeCaption: Boolean = false
) = forwardMessages(
toChatId = toChatId,
fromChatId = fromChatId,
messageIds = (listOf(firstMessageId) + messageIds.toList()),
threadId = threadId,
disableNotification = disableNotification,
protectContent = protectContent,
removeCaption = removeCaption
)
suspend fun TelegramBot.forwardMessages( suspend fun TelegramBot.forwardMessages(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
messagesMetas: List<Message.MetaInfo>, messagesMetas: List<Message.MetaInfo>,
@ -139,26 +120,6 @@ suspend fun TelegramBot.forward(
removeCaption = removeCaption removeCaption = removeCaption
) )
suspend fun TelegramBot.forward(
toChatId: ChatIdentifier,
fromChatId: ChatIdentifier,
firstMessageId: MessageId,
vararg messageIds: MessageId,
threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
removeCaption: Boolean = false
) = forwardMessages(
toChatId = toChatId,
fromChatId = fromChatId,
firstMessageId = firstMessageId,
messageIds = *messageIds,
threadId = threadId,
disableNotification = disableNotification,
protectContent = protectContent,
removeCaption = removeCaption
)
suspend fun TelegramBot.forward( suspend fun TelegramBot.forward(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
messagesMetas: List<Message.MetaInfo>, messagesMetas: List<Message.MetaInfo>,

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
suspend fun TelegramBot.getUpdates( suspend fun TelegramBot.getUpdates(
offset: UpdateIdentifier? = null, offset: UpdateId? = null,
limit: Int = getUpdatesLimit.last, limit: Int = getUpdatesLimit.last,
timeout: Seconds? = null, timeout: Seconds? = null,
allowed_updates: List<String>? = ALL_UPDATES_LIST allowed_updates: List<String>? = ALL_UPDATES_LIST

View File

@ -1,13 +1,12 @@
package dev.inmo.tgbotapi.extensions.api package dev.inmo.tgbotapi.extensions.api
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.GetUpdates
import dev.inmo.tgbotapi.requests.GetUpdatesRaw import dev.inmo.tgbotapi.requests.GetUpdatesRaw
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
suspend fun TelegramBot.getRawUpdates( suspend fun TelegramBot.getRawUpdates(
offset: UpdateIdentifier? = null, offset: UpdateId? = null,
limit: Int = getUpdatesLimit.last, limit: Int = getUpdatesLimit.last,
timeout: Seconds? = null, timeout: Seconds? = null,
allowed_updates: List<String>? = ALL_UPDATES_LIST allowed_updates: List<String>? = ALL_UPDATES_LIST

View File

@ -1,6 +1,6 @@
package dev.inmo.tgbotapi.extensions.api.InternalUtils package dev.inmo.tgbotapi.extensions.api.InternalUtils
import dev.inmo.tgbotapi.types.MediaGroupIdentifier import dev.inmo.tgbotapi.types.MediaGroupId
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent
import dev.inmo.tgbotapi.types.update.* import dev.inmo.tgbotapi.types.update.*
@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.utils.extensions.asMediaGroupMessage
*/ */
internal fun List<Update>.convertWithMediaGroupUpdates(): List<Update> { internal fun List<Update>.convertWithMediaGroupUpdates(): List<Update> {
val resultUpdates = mutableListOf<Update>() val resultUpdates = mutableListOf<Update>()
val mediaGroups = mutableMapOf<MediaGroupIdentifier, MutableList<Pair<BaseSentMessageUpdate, PossiblySentViaBotCommonMessage<MediaGroupPartContent>>>>() val mediaGroups = mutableMapOf<MediaGroupId, MutableList<Pair<BaseSentMessageUpdate, PossiblySentViaBotCommonMessage<MediaGroupPartContent>>>>()
for (update in this) { for (update in this) {
val message = (update.data as? PossiblySentViaBotCommonMessage<*>) ?.let { val message = (update.data as? PossiblySentViaBotCommonMessage<*>) ?.let {

View File

@ -3,10 +3,10 @@ package dev.inmo.tgbotapi.extensions.api.answers
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.answers.AnswerCallbackQuery import dev.inmo.tgbotapi.requests.answers.AnswerCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
import dev.inmo.tgbotapi.types.CallbackQueryIdentifier import dev.inmo.tgbotapi.types.CallbackQueryId
suspend fun TelegramBot.answerCallbackQuery( suspend fun TelegramBot.answerCallbackQuery(
callbackQueryId: CallbackQueryIdentifier, callbackQueryId: CallbackQueryId,
text: String? = null, text: String? = null,
showAlert: Boolean? = null, showAlert: Boolean? = null,
url: String? = null, url: String? = null,

View File

@ -5,10 +5,10 @@ import dev.inmo.tgbotapi.requests.answers.AnswerInlineQuery
import dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton import dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
import dev.inmo.tgbotapi.types.InlineQueryIdentifier import dev.inmo.tgbotapi.types.InlineQueryId
suspend fun TelegramBot.answerInlineQuery( suspend fun TelegramBot.answerInlineQuery(
inlineQueryID: InlineQueryIdentifier, inlineQueryID: InlineQueryId,
results: List<InlineQueryResult> = emptyList(), results: List<InlineQueryResult> = emptyList(),
cachedTime: Int? = null, cachedTime: Int? = null,
isPersonal: Boolean? = null, isPersonal: Boolean? = null,
@ -37,7 +37,7 @@ suspend fun TelegramBot.answer(
) = answerInlineQuery(inlineQuery.id, results, cachedTime, isPersonal, nextOffset, button) ) = answerInlineQuery(inlineQuery.id, results, cachedTime, isPersonal, nextOffset, button)
suspend fun TelegramBot.answerInlineQuery( suspend fun TelegramBot.answerInlineQuery(
inlineQueryID: InlineQueryIdentifier, inlineQueryID: InlineQueryId,
results: List<InlineQueryResult> = emptyList(), results: List<InlineQueryResult> = emptyList(),
cachedTime: Int? = null, cachedTime: Int? = null,
isPersonal: Boolean? = null, isPersonal: Boolean? = null,

View File

@ -3,12 +3,12 @@ package dev.inmo.tgbotapi.extensions.api.answers.payments
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.answers.payments.AnswerShippingQueryError import dev.inmo.tgbotapi.requests.answers.payments.AnswerShippingQueryError
import dev.inmo.tgbotapi.requests.answers.payments.AnswerShippingQueryOk import dev.inmo.tgbotapi.requests.answers.payments.AnswerShippingQueryOk
import dev.inmo.tgbotapi.types.ShippingQueryIdentifier import dev.inmo.tgbotapi.types.ShippingQueryId
import dev.inmo.tgbotapi.types.payments.ShippingOption import dev.inmo.tgbotapi.types.payments.ShippingOption
import dev.inmo.tgbotapi.types.payments.ShippingQuery import dev.inmo.tgbotapi.types.payments.ShippingQuery
suspend fun TelegramBot.answerShippingQueryOk( suspend fun TelegramBot.answerShippingQueryOk(
id: ShippingQueryIdentifier, id: ShippingQueryId,
shippingOptions: List<ShippingOption> shippingOptions: List<ShippingOption>
) = execute(AnswerShippingQueryOk(id, shippingOptions)) ) = execute(AnswerShippingQueryOk(id, shippingOptions))
suspend fun TelegramBot.answerShippingQueryOk( suspend fun TelegramBot.answerShippingQueryOk(
@ -17,7 +17,7 @@ suspend fun TelegramBot.answerShippingQueryOk(
) = answerShippingQueryOk(shippingQuery.id, shippingOptions) ) = answerShippingQueryOk(shippingQuery.id, shippingOptions)
suspend fun TelegramBot.answerShippingQueryError( suspend fun TelegramBot.answerShippingQueryError(
id: ShippingQueryIdentifier, id: ShippingQueryId,
error: String error: String
) = execute(AnswerShippingQueryError(id, error)) ) = execute(AnswerShippingQueryError(id, error))
suspend fun TelegramBot.answerShippingQueryError( suspend fun TelegramBot.answerShippingQueryError(

View File

@ -1,21 +1,15 @@
package dev.inmo.tgbotapi.extensions.api.edit package dev.inmo.tgbotapi.extensions.api.edit
import dev.inmo.tgbotapi.abstracts.TextedWithTextSources
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.extensions.api.edit.caption.editMessageCaption
import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation
import dev.inmo.tgbotapi.extensions.api.edit.media.editMessageMedia import dev.inmo.tgbotapi.extensions.api.edit.media.editMessageMedia
import dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup import dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup
import dev.inmo.tgbotapi.extensions.api.edit.text.editMessageText import dev.inmo.tgbotapi.extensions.api.edit.text.editMessageText
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.location.LiveLocation import dev.inmo.tgbotapi.types.location.LiveLocation
import dev.inmo.tgbotapi.types.media.TelegramMedia import dev.inmo.tgbotapi.types.media.TelegramMedia
import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.message.textsources.TextSource
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
@ -26,7 +20,7 @@ import dev.inmo.tgbotapi.utils.buildEntities
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.edit( suspend fun TelegramBot.edit(
messageId: InlineMessageIdentifier, messageId: InlineMessageId,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
horizontalAccuracy: Meters? = null, horizontalAccuracy: Meters? = null,
@ -40,7 +34,7 @@ suspend fun TelegramBot.edit(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.edit( suspend fun TelegramBot.edit(
messageId: InlineMessageIdentifier, messageId: InlineMessageId,
location: LiveLocation, location: LiveLocation,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation( ) = editLiveLocation(
@ -52,7 +46,7 @@ suspend fun TelegramBot.edit(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.edit( suspend fun TelegramBot.edit(
messageId: InlineMessageIdentifier, messageId: InlineMessageId,
media: TelegramMedia, media: TelegramMedia,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = editMessageMedia(messageId, media, replyMarkup) ) = editMessageMedia(messageId, media, replyMarkup)
@ -62,7 +56,7 @@ suspend fun TelegramBot.edit(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.edit( suspend fun TelegramBot.edit(
messageId: InlineMessageIdentifier, messageId: InlineMessageId,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = editMessageReplyMarkup(messageId, replyMarkup) ) = editMessageReplyMarkup(messageId, replyMarkup)
@ -71,7 +65,7 @@ suspend fun TelegramBot.edit(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.edit( suspend fun TelegramBot.edit(
messageId: InlineMessageIdentifier, messageId: InlineMessageId,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -83,7 +77,7 @@ suspend fun TelegramBot.edit(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.edit( suspend fun TelegramBot.edit(
messageId: InlineMessageIdentifier, messageId: InlineMessageId,
entities: TextSourcesList, entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
@ -94,7 +88,7 @@ suspend fun TelegramBot.edit(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.edit( suspend fun TelegramBot.edit(
messageId: InlineMessageIdentifier, messageId: InlineMessageId,
separator: TextSource? = null, separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null, replyMarkup: InlineKeyboardMarkup? = null,
@ -106,7 +100,7 @@ suspend fun TelegramBot.edit(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.edit( suspend fun TelegramBot.edit(
messageId: InlineMessageIdentifier, messageId: InlineMessageId,
separator: String, separator: String,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null, replyMarkup: InlineKeyboardMarkup? = null,

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.edit.caption
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.caption.EditInlineMessageCaption import dev.inmo.tgbotapi.requests.edit.caption.EditInlineMessageCaption
import dev.inmo.tgbotapi.types.InlineMessageIdentifier import dev.inmo.tgbotapi.types.InlineMessageId
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.editMessageCaption( suspend fun TelegramBot.editMessageCaption(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
@ -23,7 +23,7 @@ suspend fun TelegramBot.editMessageCaption(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.editMessageCaption( suspend fun TelegramBot.editMessageCaption(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
entities: TextSourcesList, entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageCaption(inlineMessageId, entities, replyMarkup)) ) = execute(EditInlineMessageCaption(inlineMessageId, entities, replyMarkup))

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.location.LiveLocation import dev.inmo.tgbotapi.types.location.LiveLocation
suspend fun TelegramBot.editLiveLocation( suspend fun TelegramBot.editLiveLocation(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
horizontalAccuracy: Meters? = null, horizontalAccuracy: Meters? = null,
@ -20,7 +20,7 @@ suspend fun TelegramBot.editLiveLocation(
) )
) )
suspend fun TelegramBot.editLiveLocation( suspend fun TelegramBot.editLiveLocation(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
location: LiveLocation, location: LiveLocation,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(inlineMessageId, location.latitude, location.longitude, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, replyMarkup) ) = editLiveLocation(inlineMessageId, location.latitude, location.longitude, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, replyMarkup)

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.edit.location.live
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.location.live.StopInlineMessageLiveLocation import dev.inmo.tgbotapi.requests.edit.location.live.StopInlineMessageLiveLocation
import dev.inmo.tgbotapi.types.InlineMessageIdentifier import dev.inmo.tgbotapi.types.InlineMessageId
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
/** /**
@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.stopLiveLocation( suspend fun TelegramBot.stopLiveLocation(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = execute( ) = execute(
StopInlineMessageLiveLocation( StopInlineMessageLiveLocation(

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.edit.media
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.media.EditInlineMessageMedia import dev.inmo.tgbotapi.requests.edit.media.EditInlineMessageMedia
import dev.inmo.tgbotapi.types.InlineMessageIdentifier import dev.inmo.tgbotapi.types.InlineMessageId
import dev.inmo.tgbotapi.types.media.TelegramMedia import dev.inmo.tgbotapi.types.media.TelegramMedia
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.editMessageMedia( suspend fun TelegramBot.editMessageMedia(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
media: TelegramMedia, media: TelegramMedia,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageMedia(inlineMessageId, media, replyMarkup)) ) = execute(EditInlineMessageMedia(inlineMessageId, media, replyMarkup))

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.edit.reply_markup
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.reply_markup.EditInlineMessageReplyMarkup import dev.inmo.tgbotapi.requests.edit.reply_markup.EditInlineMessageReplyMarkup
import dev.inmo.tgbotapi.types.InlineMessageIdentifier import dev.inmo.tgbotapi.types.InlineMessageId
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
/** /**
@ -10,6 +10,6 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.editMessageReplyMarkup( suspend fun TelegramBot.editMessageReplyMarkup(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageReplyMarkup(inlineMessageId, replyMarkup)) ) = execute(EditInlineMessageReplyMarkup(inlineMessageId, replyMarkup))

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.edit.text
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.text.EditInlineMessageText import dev.inmo.tgbotapi.requests.edit.text.EditInlineMessageText
import dev.inmo.tgbotapi.types.InlineMessageIdentifier import dev.inmo.tgbotapi.types.InlineMessageId
import dev.inmo.tgbotapi.types.LinkPreviewOptions import dev.inmo.tgbotapi.types.LinkPreviewOptions
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.message.ParseMode
@ -16,7 +16,7 @@ import dev.inmo.tgbotapi.utils.buildEntities
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.editMessageText( suspend fun TelegramBot.editMessageText(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -28,7 +28,7 @@ suspend fun TelegramBot.editMessageText(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.editMessageText( suspend fun TelegramBot.editMessageText(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
entities: TextSourcesList, entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
@ -39,7 +39,7 @@ suspend fun TelegramBot.editMessageText(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.editMessageText( suspend fun TelegramBot.editMessageText(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
separator: TextSource? = null, separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null, replyMarkup: InlineKeyboardMarkup? = null,
@ -51,7 +51,7 @@ suspend fun TelegramBot.editMessageText(
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.editMessageText( suspend fun TelegramBot.editMessageText(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
separator: String, separator: String,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null, replyMarkup: InlineKeyboardMarkup? = null,

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.chat.CommonUser
suspend fun TelegramBot.getGameScore( suspend fun TelegramBot.getGameScore(
userId: UserId, userId: UserId,
inlineMessageId: InlineMessageIdentifier inlineMessageId: InlineMessageId
) = execute( ) = execute(
GetGameHighScoresByInlineMessageId( GetGameHighScoresByInlineMessageId(
userId, inlineMessageId userId, inlineMessageId
@ -16,5 +16,5 @@ suspend fun TelegramBot.getGameScore(
suspend fun TelegramBot.getGameScore( suspend fun TelegramBot.getGameScore(
user: CommonUser, user: CommonUser,
inlineMessageId: InlineMessageIdentifier inlineMessageId: InlineMessageId
) = getGameScore(user.id, inlineMessageId) ) = getGameScore(user.id, inlineMessageId)

View File

@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.chat.CommonUser
suspend fun TelegramBot.setGameScore( suspend fun TelegramBot.setGameScore(
userId: UserId, userId: UserId,
score: Long, score: Long,
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
force: Boolean = false, force: Boolean = false,
disableEditMessage: Boolean = false disableEditMessage: Boolean = false
) = execute( ) = execute(
@ -20,7 +20,7 @@ suspend fun TelegramBot.setGameScore(
suspend fun TelegramBot.setGameScore( suspend fun TelegramBot.setGameScore(
user: CommonUser, user: CommonUser,
score: Long, score: Long,
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
force: Boolean = false, force: Boolean = false,
disableEditMessage: Boolean = false disableEditMessage: Boolean = false
) = setGameScore(user.id, score, inlineMessageId, force, disableEditMessage) ) = setGameScore(user.id, score, inlineMessageId, force, disableEditMessage)

View File

@ -2,14 +2,21 @@ package dev.inmo.tgbotapi.extensions.api.get
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.get.GetStickerSet import dev.inmo.tgbotapi.requests.get.GetStickerSet
import dev.inmo.tgbotapi.types.StickerSetName
import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.files.Sticker
suspend fun TelegramBot.getStickerSet( suspend fun TelegramBot.getStickerSet(
name: String name: StickerSetName
) = execute( ) = execute(
GetStickerSet(name) GetStickerSet(name)
) )
suspend fun TelegramBot.getStickerSet(
name: String
) = getStickerSet(
StickerSetName(name)
)
suspend fun TelegramBot.getStickerSetOrNull( suspend fun TelegramBot.getStickerSetOrNull(
sticker: Sticker sticker: Sticker
) = sticker.stickerSetName ?.let { ) = sticker.stickerSetName ?.let {

View File

@ -47,25 +47,6 @@ suspend fun TelegramBot.copyMessages(
removeCaption = removeCaption removeCaption = removeCaption
) )
suspend fun TelegramBot.copyMessages(
toChatId: ChatIdentifier,
fromChatId: ChatIdentifier,
firstMessageId: MessageId,
vararg messageIds: MessageId,
threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
removeCaption: Boolean = false
) = copyMessages(
toChatId = toChatId,
fromChatId = fromChatId,
messageIds = (listOf(firstMessageId) + messageIds.toList()),
threadId = threadId,
disableNotification = disableNotification,
protectContent = protectContent,
removeCaption = removeCaption
)
suspend fun TelegramBot.copyMessages( suspend fun TelegramBot.copyMessages(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
messagesMetas: List<Message.MetaInfo>, messagesMetas: List<Message.MetaInfo>,
@ -138,26 +119,6 @@ suspend fun TelegramBot.copy(
removeCaption = removeCaption removeCaption = removeCaption
) )
suspend fun TelegramBot.copy(
toChatId: ChatIdentifier,
fromChatId: ChatIdentifier,
firstMessageId: MessageId,
vararg messageIds: MessageId,
threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
removeCaption: Boolean = false
) = copyMessages(
toChatId = toChatId,
fromChatId = fromChatId,
firstMessageId = firstMessageId,
messageIds = messageIds,
threadId = threadId,
disableNotification = disableNotification,
protectContent = protectContent,
removeCaption = removeCaption
)
suspend fun TelegramBot.copy( suspend fun TelegramBot.copy(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
messagesMetas: List<Message.MetaInfo>, messagesMetas: List<Message.MetaInfo>,

View File

@ -108,15 +108,15 @@ suspend inline fun TelegramBot.sendVoice(
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ) = execute(
SendVoice( SendVoice(
chatId, chatId = chatId,
voice, voice = voice,
entities, entities = entities,
duration, threadId = threadId,
threadId, duration = duration,
disableNotification, disableNotification = disableNotification,
protectContent, protectContent = protectContent,
replyParameters, replyParameters = replyParameters,
replyMarkup replyMarkup = replyMarkup
) )
) )

View File

@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.stickers.AddStickerToSet import dev.inmo.tgbotapi.requests.stickers.AddStickerToSet
import dev.inmo.tgbotapi.requests.stickers.InputSticker import dev.inmo.tgbotapi.requests.stickers.InputSticker
import dev.inmo.tgbotapi.types.StickerSetName
import dev.inmo.tgbotapi.types.StickerType import dev.inmo.tgbotapi.types.StickerType
import dev.inmo.tgbotapi.types.chat.CommonUser import dev.inmo.tgbotapi.types.chat.CommonUser
import dev.inmo.tgbotapi.types.UserId import dev.inmo.tgbotapi.types.UserId
@ -12,12 +13,18 @@ import dev.inmo.tgbotapi.types.stickers.StickerSet
suspend fun TelegramBot.addStickerToSet( suspend fun TelegramBot.addStickerToSet(
userId: UserId, userId: UserId,
stickerSetName: String, stickerSetName: StickerSetName,
inputSticker: InputSticker inputSticker: InputSticker
) = execute( ) = execute(
AddStickerToSet(userId, stickerSetName, inputSticker) AddStickerToSet(userId, stickerSetName, inputSticker)
) )
suspend fun TelegramBot.addStickerToSet(
userId: UserId,
stickerSetName: String,
inputSticker: InputSticker
) = addStickerToSet(userId, StickerSetName(stickerSetName), inputSticker)
suspend fun TelegramBot.addStickerToSet( suspend fun TelegramBot.addStickerToSet(
userId: UserId, userId: UserId,
stickerSet: StickerSet, stickerSet: StickerSet,

View File

@ -62,7 +62,7 @@ suspend fun TelegramBot.setStickerSetThumbnail(
stickerSet: StickerSet, stickerSet: StickerSet,
thumbnail: FileId thumbnail: FileId
) = setStickerSetThumbnail( ) = setStickerSetThumbnail(
user.id, stickerSet.name, thumbnail user.id, stickerSet, thumbnail
) )
suspend fun TelegramBot.setStickerSetThumbnail( suspend fun TelegramBot.setStickerSetThumbnail(
@ -70,5 +70,5 @@ suspend fun TelegramBot.setStickerSetThumbnail(
stickerSet: StickerSet, stickerSet: StickerSet,
thumbnail: MultipartFile thumbnail: MultipartFile
) = setStickerSetThumbnail( ) = setStickerSetThumbnail(
user.id, stickerSet.name, thumbnail user.id, stickerSet, thumbnail
) )

View File

@ -326,22 +326,22 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEditedContentKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEditedContentKt {
public static final fun waitEditedAnimation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedAnimation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedAnimation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedAnimation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedAnyMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedAnyMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedAnyMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedAnyMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedAudio (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedAudio (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedAudio$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedAudio$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedAudioMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedAudioMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedAudioMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedAudioMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedContact (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedContact (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedContact$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedContact$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedDice (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedDice (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedDice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedDice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedDocument (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedDocument (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedDocument$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedDocument$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedDocumentMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedDocumentMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedDocumentMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedDocumentMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedGame (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedGame (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedGame$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedGame$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedGiveawayContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedGiveawayContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@ -354,28 +354,28 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitEditedLiveLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedLiveLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedMedia$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedMedia$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedMessageContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedMessageContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedMessageContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedMessageContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedPhoto (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedPhoto (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedStaticLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedStaticLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedStaticLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedStaticLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedSticker (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedSticker (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedSticker$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedSticker$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedText (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedText (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedText$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedText$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedTextedMediaContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedTextedMediaContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedTextedMediaContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedTextedMediaContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVenue (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVenue (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedVenue$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedVenue$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVideo (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVideo (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedVideo$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedVideo$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVideoNote (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVideoNote (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedVideoNote$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedVideoNote$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVisualMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVisualMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedVisualMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedVisualMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVoice (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVoice (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedVoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedVoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
} }
@ -387,16 +387,16 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitEditedAnyMediaGroupContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedAnyMediaGroupContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedAudioMediaGroupContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedAudioMediaGroupContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedAudioMediaGroupContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedAudioMediaGroupContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedAudioMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedAudioMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedAudioMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedAudioMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedContactMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedContactMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedContactMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedContactMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedDiceMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedDiceMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedDiceMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedDiceMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedDocumentMediaGroupContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedDocumentMediaGroupContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedDocumentMediaGroupContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedDocumentMediaGroupContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedDocumentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedDocumentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedDocumentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedDocumentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedGameMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedGameMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedGameMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedGameMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedGiveawayContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedGiveawayContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@ -409,12 +409,12 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitEditedLiveLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedLiveLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedMediaMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedMediaMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedMediaMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedMediaMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedMessageContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedMessageContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedMessageContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedMessageContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedPhotoMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedPhotoMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedPhotoMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedPhotoMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedStaticLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedStaticLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedStaticLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedStaticLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedStickerMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedStickerMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@ -425,8 +425,8 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitEditedTextedMediaContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedTextedMediaContentMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVenueMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVenueMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedVenueMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedVenueMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVideoMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVideoMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedVideoMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedVideoMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVideoNoteMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVideoNoteMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun waitEditedVideoNoteMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun waitEditedVideoNoteMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun waitEditedVisualMediaGroupContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun waitEditedVisualMediaGroupContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@ -1303,8 +1303,8 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_f
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdCallbackQueryMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdCallbackQueryMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdCallbackQueryMarkerFactory; public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdCallbackQueryMarkerFactory;
public fun invoke (Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun invoke-gcdXFtE (Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdChatBoostRemovedMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdChatBoostRemovedMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
@ -1321,20 +1321,20 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_f
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdInlineQueryMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdInlineQueryMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdInlineQueryMarkerFactory; public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdInlineQueryMarkerFactory;
public fun invoke (Ldev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun invoke-nHD9vJQ (Ldev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdPollAnswerMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdPollAnswerMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdPollAnswerMarkerFactory; public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdPollAnswerMarkerFactory;
public fun invoke (Ldev/inmo/tgbotapi/types/polls/PollAnswer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun invoke-ErVIubg (Ldev/inmo/tgbotapi/types/polls/PollAnswer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdPollMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdPollMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdPollMarkerFactory; public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByIdPollMarkerFactory;
public fun invoke (Ldev/inmo/tgbotapi/types/polls/Poll;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun invoke-ErVIubg (Ldev/inmo/tgbotapi/types/polls/Poll;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserCallbackQueryMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserCallbackQueryMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {

View File

@ -5,7 +5,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder
import dev.inmo.micro_utils.coroutines.* import dev.inmo.micro_utils.coroutines.*
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.handlers_registrar.TriggersHolder import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.handlers_registrar.TriggersHolder
import dev.inmo.tgbotapi.types.UpdateIdentifier import dev.inmo.tgbotapi.types.UpdateId
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
import dev.inmo.tgbotapi.updateshandlers.* import dev.inmo.tgbotapi.updateshandlers.*
import kotlinx.coroutines.* import kotlinx.coroutines.*
@ -72,7 +72,7 @@ class DefaultBehaviourContext(
private val additionalUpdatesSharedFlow = MutableSharedFlow<Update>(0, broadcastChannelsSize, onBufferOverflow) private val additionalUpdatesSharedFlow = MutableSharedFlow<Update>(0, broadcastChannelsSize, onBufferOverflow)
override val allUpdatesFlow: Flow<Update> = (additionalUpdatesSharedFlow.asSharedFlow()).let { override val allUpdatesFlow: Flow<Update> = (additionalUpdatesSharedFlow.asSharedFlow()).let {
if (upstreamUpdatesFlow != null) { if (upstreamUpdatesFlow != null) {
val handledUpdates = mutableSetOf<UpdateIdentifier>() val handledUpdates = mutableSetOf<UpdateId>()
(it + upstreamUpdatesFlow).filter { (it + upstreamUpdatesFlow).filter {
val passed = handledUpdates.add(it.updateId) val passed = handledUpdates.add(it.updateId)
(passed).also { passed -> (passed).also { passed ->

View File

@ -13,131 +13,118 @@ import kotlinx.coroutines.flow.map
@RiskFeature(lowLevelRiskFeatureMessage) @RiskFeature(lowLevelRiskFeatureMessage)
suspend inline fun <reified O : MessageContent> BehaviourContext.waitEditedContent( suspend inline fun <reified O : MessageContent> BehaviourContext.waitEditedContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
includeMediaGroups: Boolean = true,
noinline errorFactory: NullableRequestBuilder<*> = { null } noinline errorFactory: NullableRequestBuilder<*> = { null }
): Flow<O> = waitEditedContentMessage<O>(initRequest, errorFactory).map { it.content } ): Flow<O> = waitEditedContentMessage<O>(initRequest, errorFactory).map { it.content }
suspend fun BehaviourContext.waitEditedMessageContent( suspend fun BehaviourContext.waitEditedMessageContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = true ) = waitEditedContent<MessageContent>(initRequest, errorFactory)
) = waitEditedContent<MessageContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedContentMessage( suspend fun BehaviourContext.waitEditedContentMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = true ) = waitEditedContent<MessageContent>(initRequest, errorFactory)
) = waitEditedContent<MessageContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedContact( suspend fun BehaviourContext.waitEditedContact(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<ContactContent>(initRequest, false, errorFactory) ) = waitEditedContent<ContactContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedDice( suspend fun BehaviourContext.waitEditedDice(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<DiceContent>(initRequest, false, errorFactory) ) = waitEditedContent<DiceContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedGame( suspend fun BehaviourContext.waitEditedGame(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<GameContent>(initRequest, false, errorFactory) ) = waitEditedContent<GameContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedLocation( suspend fun BehaviourContext.waitEditedLocation(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<LocationContent>(initRequest, false, errorFactory) ) = waitEditedContent<LocationContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedLiveLocation( suspend fun BehaviourContext.waitEditedLiveLocation(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<LiveLocationContent>(initRequest, false, errorFactory) ) = waitEditedContent<LiveLocationContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedStaticLocation( suspend fun BehaviourContext.waitEditedStaticLocation(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<StaticLocationContent>(initRequest, false, errorFactory) ) = waitEditedContent<StaticLocationContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedText( suspend fun BehaviourContext.waitEditedText(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<TextContent>(initRequest, false, errorFactory) ) = waitEditedContent<TextContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedVenue( suspend fun BehaviourContext.waitEditedVenue(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<VenueContent>(initRequest, false, errorFactory) ) = waitEditedContent<VenueContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedAudioMediaGroupContent( suspend fun BehaviourContext.waitEditedAudioMediaGroupContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = true ) = waitEditedContent<AudioMediaGroupPartContent>(initRequest, errorFactory)
) = waitEditedContent<AudioMediaGroupPartContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedDocumentMediaGroupContent( suspend fun BehaviourContext.waitEditedDocumentMediaGroupContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = true ) = waitEditedContent<DocumentMediaGroupPartContent>(initRequest, errorFactory)
) = waitEditedContent<DocumentMediaGroupPartContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedMedia( suspend fun BehaviourContext.waitEditedMedia(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false ) = waitEditedContent<MediaContent>(initRequest, errorFactory)
) = waitEditedContent<MediaContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedAnyMediaGroupContent( suspend fun BehaviourContext.waitEditedAnyMediaGroupContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = true ) = waitEditedContent<MediaGroupPartContent>(initRequest, errorFactory)
) = waitEditedContent<MediaGroupPartContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedVisualMediaGroupContent( suspend fun BehaviourContext.waitEditedVisualMediaGroupContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = true ) = waitEditedContent<VisualMediaGroupPartContent>(initRequest, errorFactory)
) = waitEditedContent<VisualMediaGroupPartContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedTextedMediaContent( suspend fun BehaviourContext.waitEditedTextedMediaContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = true ) = waitEditedContent<TextedMediaContent>(initRequest, errorFactory)
) = waitEditedContent<TextedMediaContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedAnimation( suspend fun BehaviourContext.waitEditedAnimation(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<AnimationContent>(initRequest, false, errorFactory) ) = waitEditedContent<AnimationContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedAudio( suspend fun BehaviourContext.waitEditedAudio(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false ) = waitEditedContent<AudioContent>(initRequest, errorFactory)
) = waitEditedContent<AudioContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedDocument( suspend fun BehaviourContext.waitEditedDocument(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false ) = waitEditedContent<DocumentContent>(initRequest, errorFactory)
) = waitEditedContent<DocumentContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedPhoto( suspend fun BehaviourContext.waitEditedPhoto(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false ) = waitEditedContent<PhotoContent>(initRequest, errorFactory)
) = waitEditedContent<PhotoContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedSticker( suspend fun BehaviourContext.waitEditedSticker(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<StickerContent>(initRequest, false, errorFactory) ) = waitEditedContent<StickerContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedVideo( suspend fun BehaviourContext.waitEditedVideo(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false ) = waitEditedContent<VideoContent>(initRequest, errorFactory)
) = waitEditedContent<VideoContent>(initRequest, includeMediaGroups, errorFactory)
suspend fun BehaviourContext.waitEditedVideoNote( suspend fun BehaviourContext.waitEditedVideoNote(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<VideoNoteContent>(initRequest, false, errorFactory) ) = waitEditedContent<VideoNoteContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedVoice( suspend fun BehaviourContext.waitEditedVoice(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<VoiceContent>(initRequest, false, errorFactory) ) = waitEditedContent<VoiceContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedInvoice( suspend fun BehaviourContext.waitEditedInvoice(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<InvoiceContent>(initRequest, false, errorFactory) ) = waitEditedContent<InvoiceContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedGiveawayContent( suspend fun BehaviourContext.waitEditedGiveawayContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<GiveawayContent>(initRequest, false, errorFactory) ) = waitEditedContent<GiveawayContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedGiveawayPublicResultsContent( suspend fun BehaviourContext.waitEditedGiveawayPublicResultsContent(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEditedContent<GiveawayPublicResultsContent>(initRequest, false, errorFactory) ) = waitEditedContent<GiveawayPublicResultsContent>(initRequest, errorFactory)

View File

@ -81,7 +81,6 @@ suspend fun BehaviourContext.waitEditedDocumentMediaGroupContentMessage(
suspend fun BehaviourContext.waitEditedMediaMessage( suspend fun BehaviourContext.waitEditedMediaMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false
) = waitEditedContentMessage<MediaContent>(initRequest, errorFactory) ) = waitEditedContentMessage<MediaContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedAnyMediaGroupContentMessage( suspend fun BehaviourContext.waitEditedAnyMediaGroupContentMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
@ -102,17 +101,14 @@ suspend fun BehaviourContext.waitEditedAnimationMessage(
suspend fun BehaviourContext.waitEditedAudioMessage( suspend fun BehaviourContext.waitEditedAudioMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false
) = waitEditedContentMessage<AudioContent>(initRequest, errorFactory) ) = waitEditedContentMessage<AudioContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedDocumentMessage( suspend fun BehaviourContext.waitEditedDocumentMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false
) = waitEditedContentMessage<DocumentContent>(initRequest, errorFactory) ) = waitEditedContentMessage<DocumentContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedPhotoMessage( suspend fun BehaviourContext.waitEditedPhotoMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false
) = waitEditedContentMessage<PhotoContent>(initRequest, errorFactory) ) = waitEditedContentMessage<PhotoContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedStickerMessage( suspend fun BehaviourContext.waitEditedStickerMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
@ -121,7 +117,6 @@ suspend fun BehaviourContext.waitEditedStickerMessage(
suspend fun BehaviourContext.waitEditedVideoMessage( suspend fun BehaviourContext.waitEditedVideoMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
includeMediaGroups: Boolean = false
) = waitEditedContentMessage<VideoContent>(initRequest, errorFactory) ) = waitEditedContentMessage<VideoContent>(initRequest, errorFactory)
suspend fun BehaviourContext.waitEditedVideoNoteMessage( suspend fun BehaviourContext.waitEditedVideoNoteMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,

File diff suppressed because it is too large Load Diff

View File

@ -9,9 +9,3 @@ import dev.inmo.tgbotapi.types.chat.PreviewChat
interface WithPreviewChat { interface WithPreviewChat {
val chat: PreviewChat val chat: PreviewChat
} }
/**
* All inheritors of this interface have [chat] field and related to this [chat]
*/
@Deprecated("Renamed", ReplaceWith("WithPreviewChat", "dev.inmo.tgbotapi.abstracts.WithPreviewChat"))
typealias WithChat = WithPreviewChat

View File

@ -1,7 +1,7 @@
package dev.inmo.tgbotapi.abstracts.types package dev.inmo.tgbotapi.abstracts.types
import dev.inmo.tgbotapi.types.InlineMessageIdentifier import dev.inmo.tgbotapi.types.InlineMessageId
interface InlineMessageAction { interface InlineMessageAction {
val inlineMessageId: InlineMessageIdentifier val inlineMessageId: InlineMessageId
} }

View File

@ -7,6 +7,3 @@ interface LinkPreviewOptionsContainer {
val disableWebPagePreview: Boolean? val disableWebPagePreview: Boolean?
get() = linkPreviewOptions ?.isDisabled != true get() = linkPreviewOptions ?.isDisabled != true
} }
@Deprecated("Renamed", ReplaceWith("LinkPreviewOptionsContainer", "dev.inmo.tgbotapi.abstracts.types.LinkPreviewOptionsContainer"))
typealias DisableWebPagePreview = LinkPreviewOptionsContainer

View File

@ -3,17 +3,11 @@ package dev.inmo.tgbotapi.abstracts.types
import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageId
import dev.inmo.tgbotapi.types.ReplyParameters import dev.inmo.tgbotapi.types.ReplyParameters
@Deprecated("Renamed", ReplaceWith("WithReplyParameters", "dev.inmo.tgbotapi.abstracts.types.WithReplyParameters")) interface WithReplyParameters {
interface ReplyMessageId {
val replyToMessageId: MessageId?
val allowSendingWithoutReply: Boolean?
}
interface WithReplyParameters : ReplyMessageId {
val replyParameters: ReplyParameters? val replyParameters: ReplyParameters?
override val replyToMessageId: MessageId? val replyToMessageId: MessageId?
get() = replyParameters ?.messageId get() = replyParameters ?.messageId
override val allowSendingWithoutReply: Boolean? val allowSendingWithoutReply: Boolean?
get() = replyParameters ?.allowSendingWithoutReply get() = replyParameters ?.allowSendingWithoutReply
} }

View File

@ -27,25 +27,6 @@ fun ForwardMessages(
removeCaption = removeCaption removeCaption = removeCaption
) )
fun ForwardMessages(
toChatId: ChatIdentifier,
fromChatId: ChatIdentifier,
messageId: MessageId,
vararg messageIds: MessageId,
threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
removeCaption: Boolean = false
) = ForwardMessages(
toChatId = toChatId,
fromChatId = fromChatId,
messageIds = (listOf(messageId) + messageIds.toList()),
threadId = threadId,
disableNotification = disableNotification,
protectContent = protectContent,
removeCaption = removeCaption
)
@Serializable @Serializable
data class ForwardMessages ( data class ForwardMessages (
@SerialName(chatIdField) @SerialName(chatIdField)

View File

@ -21,7 +21,7 @@ private val updatesListSerializer = ListSerializer(
*/ */
@Serializable @Serializable
data class GetUpdates( data class GetUpdates(
override val offset: UpdateIdentifier? = null,// set `last update id + 1` to receive next part of updates override val offset: UpdateId? = null,// set `last update id + 1` to receive next part of updates
override val limit: Int = getUpdatesLimit.last, override val limit: Int = getUpdatesLimit.last,
override val timeout: Seconds? = null, override val timeout: Seconds? = null,
override val allowed_updates: List<String>? = ALL_UPDATES_LIST override val allowed_updates: List<String>? = ALL_UPDATES_LIST

View File

@ -1,9 +1,8 @@
package dev.inmo.tgbotapi.requests package dev.inmo.tgbotapi.requests
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ALL_UPDATES_LIST import dev.inmo.tgbotapi.types.ALL_UPDATES_LIST
import dev.inmo.tgbotapi.types.Seconds import dev.inmo.tgbotapi.types.Seconds
import dev.inmo.tgbotapi.types.UpdateIdentifier import dev.inmo.tgbotapi.types.UpdateId
import dev.inmo.tgbotapi.types.getUpdatesLimit import dev.inmo.tgbotapi.types.getUpdatesLimit
import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@ -16,7 +15,7 @@ import kotlinx.serialization.json.JsonArray
*/ */
@Serializable @Serializable
data class GetUpdatesRaw( data class GetUpdatesRaw(
override val offset: UpdateIdentifier? = null,// set `last update id + 1` to receive next part of updates override val offset: UpdateId? = null,// set `last update id + 1` to receive next part of updates
override val limit: Int = getUpdatesLimit.last, override val limit: Int = getUpdatesLimit.last,
override val timeout: Seconds? = null, override val timeout: Seconds? = null,
override val allowed_updates: List<String>? = ALL_UPDATES_LIST override val allowed_updates: List<String>? = ALL_UPDATES_LIST

View File

@ -1,14 +1,11 @@
package dev.inmo.tgbotapi.requests package dev.inmo.tgbotapi.requests
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ALL_UPDATES_LIST
import dev.inmo.tgbotapi.types.Seconds import dev.inmo.tgbotapi.types.Seconds
import dev.inmo.tgbotapi.types.UpdateIdentifier import dev.inmo.tgbotapi.types.UpdateId
import dev.inmo.tgbotapi.types.getUpdatesLimit
interface GetUpdatesRequest<T : Any> : SimpleRequest<T> { interface GetUpdatesRequest<T : Any> : SimpleRequest<T> {
val offset: UpdateIdentifier? val offset: UpdateId?
val limit: Int val limit: Int
val timeout: Seconds? val timeout: Seconds?
val allowed_updates: List<String>? val allowed_updates: List<String>?

View File

@ -9,7 +9,7 @@ import kotlinx.serialization.builtins.serializer
@Serializable @Serializable
data class AnswerCallbackQuery( data class AnswerCallbackQuery(
@SerialName(callbackQueryIdField) @SerialName(callbackQueryIdField)
val callbackQueryId: CallbackQueryIdentifier, val callbackQueryId: CallbackQueryId,
@SerialName(textField) @SerialName(textField)
val text: String? = null, val text: String? = null,
@SerialName(showAlertField) @SerialName(showAlertField)

View File

@ -13,7 +13,7 @@ import kotlinx.serialization.builtins.serializer
@Serializable @Serializable
data class AnswerInlineQuery( data class AnswerInlineQuery(
@SerialName(inlineQueryIdField) @SerialName(inlineQueryIdField)
val inlineQueryID: InlineQueryIdentifier, val inlineQueryID: InlineQueryId,
@Serializable(InlineQueryAnswersResultsSerializer::class) @Serializable(InlineQueryAnswersResultsSerializer::class)
@SerialName(resultsField) @SerialName(resultsField)
val results: List<InlineQueryResult> = emptyList(), val results: List<InlineQueryResult> = emptyList(),
@ -27,7 +27,7 @@ data class AnswerInlineQuery(
val button: InlineQueryResultsButton? = null, val button: InlineQueryResultsButton? = null,
) : SimpleRequest<Boolean> { ) : SimpleRequest<Boolean> {
constructor( constructor(
inlineQueryID: InlineQueryIdentifier, inlineQueryID: InlineQueryId,
results: List<InlineQueryResult> = emptyList(), results: List<InlineQueryResult> = emptyList(),
cachedTime: Int? = null, cachedTime: Int? = null,
isPersonal: Boolean? = null, isPersonal: Boolean? = null,

View File

@ -11,7 +11,7 @@ import kotlinx.serialization.builtins.ListSerializer
@Serializable @Serializable
data class AnswerShippingQueryOk( data class AnswerShippingQueryOk(
@SerialName(shippingQueryIdField) @SerialName(shippingQueryIdField)
override val shippingQueryId: ShippingQueryIdentifier, override val shippingQueryId: ShippingQueryId,
@Serializable(ShippingOptionsSerializer::class) @Serializable(ShippingOptionsSerializer::class)
@SerialName(shippingOptionsField) @SerialName(shippingOptionsField)
val shippingOptions: List<ShippingOption> val shippingOptions: List<ShippingOption>
@ -30,7 +30,7 @@ object ShippingOptionsSerializer : KSerializer<List<ShippingOption>> by ListSeri
@Serializable @Serializable
data class AnswerShippingQueryError( data class AnswerShippingQueryError(
@SerialName(shippingQueryIdField) @SerialName(shippingQueryIdField)
override val shippingQueryId: ShippingQueryIdentifier, override val shippingQueryId: ShippingQueryId,
@SerialName(errorMessageField) @SerialName(errorMessageField)
val error: String val error: String
) : AnswerShippingQuery { ) : AnswerShippingQuery {

View File

@ -1,7 +1,7 @@
package dev.inmo.tgbotapi.requests.answers.payments.abstracts package dev.inmo.tgbotapi.requests.answers.payments.abstracts
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ShippingQueryIdentifier import dev.inmo.tgbotapi.types.ShippingQueryId
import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.builtins.serializer import kotlinx.serialization.builtins.serializer
@ -10,6 +10,6 @@ interface AnswerShippingQuery : SimpleRequest<Boolean> {
override val resultDeserializer: DeserializationStrategy<Boolean> override val resultDeserializer: DeserializationStrategy<Boolean>
get() = Boolean.serializer() get() = Boolean.serializer()
val shippingQueryId: ShippingQueryIdentifier val shippingQueryId: ShippingQueryId
val isOk: Boolean val isOk: Boolean
} }

View File

@ -1,12 +1,12 @@
package dev.inmo.tgbotapi.requests.edit.abstracts package dev.inmo.tgbotapi.requests.edit.abstracts
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.InlineMessageIdentifier import dev.inmo.tgbotapi.types.InlineMessageId
import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.builtins.serializer import kotlinx.serialization.builtins.serializer
interface EditInlineMessage : SimpleRequest<Boolean> { interface EditInlineMessage : SimpleRequest<Boolean> {
val inlineMessageId: InlineMessageIdentifier val inlineMessageId: InlineMessageId
override val resultDeserializer: DeserializationStrategy<Boolean> override val resultDeserializer: DeserializationStrategy<Boolean>
get() = Boolean.serializer() get() = Boolean.serializer()
} }

View File

@ -3,6 +3,3 @@ package dev.inmo.tgbotapi.requests.edit.abstracts
import dev.inmo.tgbotapi.abstracts.types.LinkPreviewOptionsContainer import dev.inmo.tgbotapi.abstracts.types.LinkPreviewOptionsContainer
interface EditLinkPreviewOptionsContainer : LinkPreviewOptionsContainer interface EditLinkPreviewOptionsContainer : LinkPreviewOptionsContainer
@Deprecated("Renamed", ReplaceWith("EditLinkPreviewOptionsContainer", "dev.inmo.tgbotapi.requests.edit.abstracts.EditLinkPreviewOptionsContainer"))
typealias EditDisableWebPagePreviewMessage = EditLinkPreviewOptionsContainer

View File

@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.utils.extensions.makeString
import kotlinx.serialization.* import kotlinx.serialization.*
fun EditInlineMessageCaption( fun EditInlineMessageCaption(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
@ -26,7 +26,7 @@ fun EditInlineMessageCaption(
) )
fun EditInlineMessageCaption( fun EditInlineMessageCaption(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
entities: TextSourcesList, entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = EditInlineMessageCaption( ) = EditInlineMessageCaption(
@ -40,7 +40,7 @@ fun EditInlineMessageCaption(
@Serializable @Serializable
data class EditInlineMessageCaption internal constructor( data class EditInlineMessageCaption internal constructor(
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier, override val inlineMessageId: InlineMessageId,
@SerialName(captionField) @SerialName(captionField)
override val text: String, override val text: String,
@SerialName(parseModeField) @SerialName(parseModeField)

View File

@ -9,7 +9,7 @@ import kotlinx.serialization.*
@Serializable @Serializable
data class EditInlineMessageLiveLocation( data class EditInlineMessageLiveLocation(
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier, override val inlineMessageId: InlineMessageId,
@SerialName(latitudeField) @SerialName(latitudeField)
override val latitude: Double, override val latitude: Double,
@SerialName(longitudeField) @SerialName(longitudeField)

View File

@ -9,7 +9,7 @@ import kotlinx.serialization.*
@Serializable @Serializable
data class StopInlineMessageLiveLocation( data class StopInlineMessageLiveLocation(
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier, override val inlineMessageId: InlineMessageId,
@SerialName(replyMarkupField) @SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditReplyMessage { ) : EditInlineMessage, EditReplyMessage {

View File

@ -10,7 +10,7 @@ import kotlinx.serialization.*
@Serializable @Serializable
data class EditInlineMessageMedia( data class EditInlineMessageMedia(
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier, override val inlineMessageId: InlineMessageId,
@SerialName(mediaField) @SerialName(mediaField)
override val media: TelegramMedia, override val media: TelegramMedia,
@SerialName(replyMarkupField) @SerialName(replyMarkupField)

View File

@ -9,7 +9,7 @@ import kotlinx.serialization.*
@Serializable @Serializable
data class EditInlineMessageReplyMarkup( data class EditInlineMessageReplyMarkup(
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier, override val inlineMessageId: InlineMessageId,
@SerialName(replyMarkupField) @SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditReplyMessage { ) : EditInlineMessage, EditReplyMessage {

View File

@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.utils.extensions.makeString
import kotlinx.serialization.* import kotlinx.serialization.*
fun EditInlineMessageText( fun EditInlineMessageText(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -28,7 +28,7 @@ fun EditInlineMessageText(
) )
fun EditInlineMessageText( fun EditInlineMessageText(
inlineMessageId: InlineMessageIdentifier, inlineMessageId: InlineMessageId,
entities: TextSourcesList, entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
@ -44,7 +44,7 @@ fun EditInlineMessageText(
@Serializable @Serializable
data class EditInlineMessageText internal constructor( data class EditInlineMessageText internal constructor(
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier, override val inlineMessageId: InlineMessageId,
@SerialName(textField) @SerialName(textField)
override val text: String, override val text: String,
@SerialName(parseModeField) @SerialName(parseModeField)

View File

@ -10,7 +10,7 @@ data class GetGameHighScoresByInlineMessageId (
@SerialName(userIdField) @SerialName(userIdField)
override val userId: UserId, override val userId: UserId,
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier override val inlineMessageId: InlineMessageId
) : GetGameHighScores, InlineMessageAction { ) : GetGameHighScores, InlineMessageAction {
override val requestSerializer: SerializationStrategy<*> override val requestSerializer: SerializationStrategy<*>
get() = serializer() get() = serializer()

View File

@ -12,7 +12,7 @@ data class SetGameScoreByInlineMessageId (
@SerialName(scoreField) @SerialName(scoreField)
override val score: Long, override val score: Long,
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier, override val inlineMessageId: InlineMessageId,
@SerialName(forceField) @SerialName(forceField)
override val force: Boolean = false, override val force: Boolean = false,
@SerialName(disableEditMessageField) @SerialName(disableEditMessageField)

View File

@ -1,6 +1,7 @@
package dev.inmo.tgbotapi.requests.get package dev.inmo.tgbotapi.requests.get
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.StickerSetName
import dev.inmo.tgbotapi.types.nameField import dev.inmo.tgbotapi.types.nameField
import dev.inmo.tgbotapi.types.stickerSetNameField import dev.inmo.tgbotapi.types.stickerSetNameField
import dev.inmo.tgbotapi.types.stickers.StickerSet import dev.inmo.tgbotapi.types.stickers.StickerSet
@ -9,7 +10,7 @@ import kotlinx.serialization.*
@Serializable @Serializable
data class GetStickerSet( data class GetStickerSet(
@SerialName(nameField) @SerialName(nameField)
val name: String val name: StickerSetName
): SimpleRequest<StickerSet> { ): SimpleRequest<StickerSet> {
override fun method(): String = "getStickerSet" override fun method(): String = "getStickerSet"
override val resultDeserializer: DeserializationStrategy<StickerSet> override val resultDeserializer: DeserializationStrategy<StickerSet>

View File

@ -33,25 +33,6 @@ fun CopyMessages(
removeCaption = removeCaption removeCaption = removeCaption
) )
fun CopyMessages(
toChatId: ChatIdentifier,
fromChatId: ChatIdentifier,
messageId: MessageId,
vararg messageIds: MessageId,
threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
removeCaption: Boolean = false
) = CopyMessages(
toChatId = toChatId,
fromChatId = fromChatId,
messageIds = (listOf(messageId) + messageIds.toList()),
threadId = threadId,
disableNotification = disableNotification,
protectContent = protectContent,
removeCaption = removeCaption
)
@Serializable @Serializable
data class CopyMessages ( data class CopyMessages (
@SerialName(chatIdField) @SerialName(chatIdField)

View File

@ -8,7 +8,7 @@ import kotlinx.serialization.*
fun AddStickerToSet( fun AddStickerToSet(
userId: UserId, userId: UserId,
stickerSetName: String, stickerSetName: StickerSetName,
inputSticker: InputSticker inputSticker: InputSticker
): Request<Boolean> { ): Request<Boolean> {
val data = AddStickerToSetData(userId, stickerSetName, inputSticker) val data = AddStickerToSetData(userId, stickerSetName, inputSticker)
@ -21,12 +21,22 @@ fun AddStickerToSet(
} }
} }
fun AddStickerToSet(
userId: UserId,
stickerSetName: String,
inputSticker: InputSticker
): Request<Boolean> = AddStickerToSet(
userId = userId,
stickerSetName = StickerSetName(stickerSetName),
inputSticker = inputSticker
)
@Serializable @Serializable
data class AddStickerToSetData internal constructor( data class AddStickerToSetData internal constructor(
@SerialName(userIdField) @SerialName(userIdField)
override val userId: UserId, override val userId: UserId,
@SerialName(nameField) @SerialName(nameField)
override val name: String, override val name: StickerSetName,
@SerialName(stickerField) @SerialName(stickerField)
override val inputSticker: InputSticker override val inputSticker: InputSticker
) : StandardStickerSetAction { ) : StandardStickerSetAction {

View File

@ -19,7 +19,7 @@ import kotlinx.serialization.encoding.Encoder
*/ */
fun CreateNewStickerSet( fun CreateNewStickerSet(
userId: UserId, userId: UserId,
name: String, name: StickerSetName,
title: String, title: String,
stickersFormat: StickerFormat, stickersFormat: StickerFormat,
stickers: List<InputSticker>, stickers: List<InputSticker>,
@ -53,6 +53,28 @@ fun CreateNewStickerSet(
} }
} }
/**
* Will create one of [CreateNewStickerSet] types based on the first element of [stickers]
*
* @param needsRepainting Will be used only if you are creating custom emojis sticker pack (by passing [stickers] with
* type [InputSticker.WithKeywords.CustomEmoji])
*/
fun CreateNewStickerSet(
userId: UserId,
name: String,
title: String,
stickersFormat: StickerFormat,
stickers: List<InputSticker>,
needsRepainting: Boolean? = null
) = CreateNewStickerSet(
userId = userId,
name = StickerSetName(name),
title = title,
stickersFormat = stickersFormat,
stickers = stickers,
needsRepainting = needsRepainting
)
@Serializable(CreateNewStickerSetSerializer::class) @Serializable(CreateNewStickerSetSerializer::class)
sealed interface CreateNewStickerSet : CreateStickerSetAction { sealed interface CreateNewStickerSet : CreateStickerSetAction {
val stickerType: StickerType val stickerType: StickerType
@ -69,7 +91,7 @@ sealed interface CreateNewStickerSet : CreateStickerSetAction {
@SerialName(userIdField) @SerialName(userIdField)
override val userId: UserId, override val userId: UserId,
@SerialName(nameField) @SerialName(nameField)
override val name: String, override val name: StickerSetName,
@SerialName(titleField) @SerialName(titleField)
override val title: String, override val title: String,
@SerialName(stickerFormatField) @SerialName(stickerFormatField)
@ -86,7 +108,7 @@ sealed interface CreateNewStickerSet : CreateStickerSetAction {
@SerialName(userIdField) @SerialName(userIdField)
override val userId: UserId, override val userId: UserId,
@SerialName(nameField) @SerialName(nameField)
override val name: String, override val name: StickerSetName,
@SerialName(titleField) @SerialName(titleField)
override val title: String, override val title: String,
@SerialName(stickerFormatField) @SerialName(stickerFormatField)
@ -103,7 +125,7 @@ sealed interface CreateNewStickerSet : CreateStickerSetAction {
@SerialName(userIdField) @SerialName(userIdField)
override val userId: UserId, override val userId: UserId,
@SerialName(nameField) @SerialName(nameField)
override val name: String, override val name: StickerSetName,
@SerialName(titleField) @SerialName(titleField)
override val title: String, override val title: String,
@SerialName(stickerFormatField) @SerialName(stickerFormatField)
@ -123,7 +145,7 @@ sealed interface CreateNewStickerSet : CreateStickerSetAction {
@SerialName(userIdField) @SerialName(userIdField)
override val userId: UserId, override val userId: UserId,
@SerialName(nameField) @SerialName(nameField)
override val name: String, override val name: StickerSetName,
@SerialName(titleField) @SerialName(titleField)
override val title: String, override val title: String,
@SerialName(stickerFormatField) @SerialName(stickerFormatField)

View File

@ -8,7 +8,7 @@ import kotlinx.serialization.*
fun SetStickerSetThumbnail( fun SetStickerSetThumbnail(
userId: UserId, userId: UserId,
stickerSetName: String, stickerSetName: StickerSetName,
thumbnail: MultipartFile thumbnail: MultipartFile
): Request<Boolean> { ): Request<Boolean> {
return CommonMultipartFileRequest( return CommonMultipartFileRequest(
@ -17,6 +17,16 @@ fun SetStickerSetThumbnail(
) )
} }
fun SetStickerSetThumbnail(
userId: UserId,
stickerSetName: String,
thumbnail: MultipartFile
): Request<Boolean> = SetStickerSetThumbnail(
userId = userId,
stickerSetName = StickerSetName(stickerSetName),
thumbnail = thumbnail
)
@Serializable @Serializable
data class SetStickerSetThumbnail ( data class SetStickerSetThumbnail (
@SerialName(userIdField) @SerialName(userIdField)

View File

@ -0,0 +1,17 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class CallbackQueryId(
val string: String
) {
override fun toString(): String {
return string
}
}
@Deprecated("Renamed", ReplaceWith("CallbackQueryId", "dev.inmo.tgbotapi.types.CallbackQueryId"))
typealias CallbackQueryIdentifier = CallbackQueryId

View File

@ -26,13 +26,13 @@ sealed interface ChatIdentifier
*/ */
@Serializable(ChatIdentifierSerializer::class) @Serializable(ChatIdentifierSerializer::class)
sealed interface IdChatIdentifier : ChatIdentifier { sealed interface IdChatIdentifier : ChatIdentifier {
abstract val chatId: Identifier abstract val chatId: RawChatId
val threadId: MessageThreadId? val threadId: MessageThreadId?
get() = null get() = null
companion object { companion object {
operator fun invoke(chatId: Identifier) = ChatId(chatId) operator fun invoke(chatId: RawChatId) = ChatId(chatId)
operator fun invoke(chatId: Identifier, threadId: MessageThreadId?) = threadId ?.let { operator fun invoke(chatId: RawChatId, threadId: MessageThreadId?) = threadId ?.let {
ChatIdWithThreadId(chatId, threadId) ChatIdWithThreadId(chatId, threadId)
} ?: ChatId(chatId) } ?: ChatId(chatId)
} }
@ -40,17 +40,17 @@ sealed interface IdChatIdentifier : ChatIdentifier {
@Serializable(ChatIdentifierSerializer::class) @Serializable(ChatIdentifierSerializer::class)
@JvmInline @JvmInline
value class ChatId(override val chatId: Identifier) : IdChatIdentifier value class ChatId(override val chatId: RawChatId) : IdChatIdentifier
@Serializable(ChatIdentifierSerializer::class) @Serializable(ChatIdentifierSerializer::class)
@JvmInline @JvmInline
value class ChatIdWithThreadId(val chatIdWithThreadId: Pair<Identifier, MessageThreadId>) : IdChatIdentifier { value class ChatIdWithThreadId(val chatIdWithThreadId: Pair<RawChatId, MessageThreadId>) : IdChatIdentifier {
override val chatId: Identifier override val chatId: RawChatId
get() = chatIdWithThreadId.first get() = chatIdWithThreadId.first
override val threadId: MessageThreadId override val threadId: MessageThreadId
get() = chatIdWithThreadId.second get() = chatIdWithThreadId.second
constructor(chatId: Identifier, threadId: MessageThreadId): this(chatId to threadId) constructor(chatId: RawChatId, threadId: MessageThreadId): this(chatId to threadId)
} }
val ChatIdentifier.threadId: MessageThreadId? val ChatIdentifier.threadId: MessageThreadId?
@ -67,7 +67,7 @@ fun IdChatIdentifier.toChatWithThreadId(threadId: MessageThreadId) = IdChatIdent
* https://core.telegram.org/bots/api#formatting-options * https://core.telegram.org/bots/api#formatting-options
*/ */
@Warning("This API have restrictions in Telegram System") @Warning("This API have restrictions in Telegram System")
val Identifier.userLink: String val RawChatId.userLink: String
get() = "$internalUserLinkBeginning$this" get() = "$internalUserLinkBeginning$this"
/** /**
* https://core.telegram.org/bots/api#formatting-options * https://core.telegram.org/bots/api#formatting-options
@ -80,23 +80,20 @@ val User.userLink: String
typealias UserId = ChatId typealias UserId = ChatId
fun Identifier.toChatId(): ChatId = ChatId(this) fun RawChatId.toChatId(): ChatId = ChatId(this)
fun Int.toChatId(): IdChatIdentifier = toLong().toChatId() fun Long.toChatId(): ChatId = ChatId(RawChatId(this))
fun Byte.toChatId(): IdChatIdentifier = toLong().toChatId() fun Int.toChatId(): IdChatIdentifier = RawChatId(toLong()).toChatId()
fun Byte.toChatId(): IdChatIdentifier = RawChatId(toLong()).toChatId()
@Serializable(ChatIdentifierSerializer::class) @Serializable(ChatIdentifierSerializer::class)
@JvmInline @JvmInline
value class Username( value class Username(
@Deprecated("Renamed", ReplaceWith("full"))
val username: String
) : ChatIdentifier {
val full: String val full: String
get() = username ) : ChatIdentifier {
val username: String
get() = full
val withoutAt val withoutAt
get() = full.dropWhile { it == '@' } get() = full.dropWhile { it == '@' }
@Deprecated("Renamed", ReplaceWith("withoutAt"))
val usernameWithoutAt
get() = withoutAt
init { init {
if (!full.startsWith("@")) { if (!full.startsWith("@")) {
@ -119,7 +116,7 @@ object ChatIdentifierSerializer : KSerializer<ChatIdentifier> {
val id = internalSerializer.deserialize(decoder) val id = internalSerializer.deserialize(decoder)
return id.longOrNull ?.let { return id.longOrNull ?.let {
ChatId(it) ChatId(RawChatId(it))
} ?: id.content.let { } ?: id.content.let {
if (!it.startsWith("@")) { if (!it.startsWith("@")) {
Username("@$it") Username("@$it")
@ -131,7 +128,7 @@ object ChatIdentifierSerializer : KSerializer<ChatIdentifier> {
override fun serialize(encoder: Encoder, value: ChatIdentifier) { override fun serialize(encoder: Encoder, value: ChatIdentifier) {
when (value) { when (value) {
is IdChatIdentifier -> encoder.encodeLong(value.chatId) is IdChatIdentifier -> encoder.encodeLong(value.chatId.long)
is Username -> encoder.encodeString(value.full) is Username -> encoder.encodeString(value.full)
} }
} }
@ -145,14 +142,14 @@ object FullChatIdentifierSerializer : KSerializer<ChatIdentifier> {
val id = internalSerializer.deserialize(decoder) val id = internalSerializer.deserialize(decoder)
return id.longOrNull ?.let { return id.longOrNull ?.let {
ChatId(it) ChatId(RawChatId(it))
} ?:let { } ?:let {
val splitted = id.content.split("/") val splitted = id.content.split("/")
if (splitted.size == 2) { if (splitted.size == 2) {
val (chatId, threadId) = splitted val (chatId, threadId) = splitted
ChatIdWithThreadId( ChatIdWithThreadId(
chatId.toLongOrNull() ?: return@let null, chatId.toLongOrNull() ?.let(::RawChatId) ?: return@let null,
threadId.toLongOrNull() ?: return@let null threadId.toLongOrNull() ?.let(::MessageThreadId) ?: return@let null
) )
} else { } else {
null null
@ -168,7 +165,7 @@ object FullChatIdentifierSerializer : KSerializer<ChatIdentifier> {
override fun serialize(encoder: Encoder, value: ChatIdentifier) { override fun serialize(encoder: Encoder, value: ChatIdentifier) {
when (value) { when (value) {
is ChatId -> encoder.encodeLong(value.chatId) is ChatId -> encoder.encodeLong(value.chatId.long)
is ChatIdWithThreadId -> encoder.encodeString("${value.chatId}/${value.threadId}") is ChatIdWithThreadId -> encoder.encodeString("${value.chatId}/${value.threadId}")
is Username -> encoder.encodeString(value.full) is Username -> encoder.encodeString(value.full)
} }

View File

@ -10,7 +10,7 @@ data class ChatPhoto(
@SerialName(bigFileIdField) @SerialName(bigFileIdField)
val bigFileId: String, val bigFileId: String,
@SerialName(smallFileUniqueIdField) @SerialName(smallFileUniqueIdField)
val smallFileUniqueId: FileUniqueId, val smallFileUniqueId: TgFileUniqueId,
@SerialName(bigFileUniqueIdField) @SerialName(bigFileUniqueIdField)
val bigFileUniqueId: FileUniqueId val bigFileUniqueId: TgFileUniqueId
) )

View File

@ -1,55 +1,19 @@
package dev.inmo.tgbotapi.types package dev.inmo.tgbotapi.types
import dev.inmo.tgbotapi.utils.BuiltinMimeTypes import dev.inmo.tgbotapi.utils.BuiltinMimeTypes
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.serializer
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import kotlin.jvm.JvmInline
typealias Identifier = Long
typealias MessageId = Long
typealias MessageThreadId = Long
typealias MessageIdentifier = MessageId
typealias InlineQueryIdentifier = String
typealias UpdateIdentifier = Long
typealias MediaGroupIdentifier = String
typealias ForwardSignature = String typealias ForwardSignature = String
typealias ForwardSenderName = String typealias ForwardSenderName = String
typealias AuthorSignature = ForwardSignature typealias AuthorSignature = ForwardSignature
typealias CallbackQueryIdentifier = String
typealias PaymentQueryIdentifier = String typealias PaymentQueryIdentifier = String
typealias PreCheckoutQueryId = String
typealias ShippingQueryIdentifier = String
typealias InvoicePayload = String typealias InvoicePayload = String
typealias ShippingOptionIdentifier = String
typealias StartParameter = String typealias StartParameter = String
typealias InlineMessageIdentifier = String
typealias PollIdentifier = String
typealias StickerSetName = String
typealias FileUniqueId = String
typealias DiceResult = Int typealias DiceResult = Int
typealias FoursquareId = String typealias FoursquareId = String
typealias FoursquareType = String typealias FoursquareType = String
typealias GooglePlaceId = String typealias GooglePlaceId = String
typealias GooglePlaceType = String typealias GooglePlaceType = String
typealias MembersLimit = Int typealias MembersLimit = Int
typealias WebAppQueryId = String
@Serializable
@JvmInline
value class CustomEmojiId(
val string: String
) {
val appLink
get() = "${internalTgAppLinksBeginning}emoji?id=$this"
}
@Serializable
@JvmInline
value class StoryId(
val long: Long
)
typealias Seconds = Int typealias Seconds = Int
typealias MilliSeconds = Long typealias MilliSeconds = Long
@ -59,70 +23,6 @@ typealias UnixTimeStamp = LongSeconds
typealias Meters = Float typealias Meters = Float
typealias Degrees = Int typealias Degrees = Int
@Serializable(StickerType.Serializer::class)
sealed interface StickerType {
val type: String
@Serializable
object Regular : StickerType { override val type: String = "regular" }
@Serializable
object Mask : StickerType { override val type: String = "mask" }
@Serializable
object CustomEmoji : StickerType { override val type: String = "custom_emoji" }
@Serializable
data class Unknown(override val type: String = "custom_emoji") : StickerType
object Serializer : KSerializer<StickerType> {
override val descriptor: SerialDescriptor = String.serializer().descriptor
override fun deserialize(decoder: Decoder): StickerType {
return when (val type = decoder.decodeString()) {
Regular.type -> Regular
Mask.type -> Mask
CustomEmoji.type -> CustomEmoji
else -> Unknown(type)
}
}
override fun serialize(encoder: Encoder, value: StickerType) {
encoder.encodeString(value.type)
}
}
}
@Serializable(StickerFormat.Serializer::class)
sealed interface StickerFormat {
val type: String
@Serializable
object Static : StickerFormat { override val type: String = "static" }
@Serializable
object Animated : StickerFormat { override val type: String = "animated" }
@Serializable
object Video : StickerFormat { override val type: String = "video" }
@Serializable
data class Unknown(override val type: String = "custom_emoji") : StickerFormat
object Serializer : KSerializer<StickerFormat> {
override val descriptor: SerialDescriptor = String.serializer().descriptor
override fun deserialize(decoder: Decoder): StickerFormat {
return when (val type = decoder.decodeString()) {
Static.type -> Static
Animated.type -> Animated
Video.type -> Video
else -> Unknown(type)
}
}
override fun serialize(encoder: Encoder, value: StickerFormat) {
encoder.encodeString(value.type)
}
}
}
val usernameRegex = Regex("@[\\w\\d_]+") val usernameRegex = Regex("@[\\w\\d_]+")
val degreesLimit = 1 .. 360 val degreesLimit = 1 .. 360

View File

@ -0,0 +1,13 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class CustomEmojiId(
val string: String
) {
val appLink
get() = "${internalTgAppLinksBeginning}emoji?id=$this"
}

View File

@ -0,0 +1,16 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class InlineMessageId(
val string: String
) {
override fun toString(): String {
return string
}
}
@Deprecated("Renamed", ReplaceWith("InlineMessageId", "dev.inmo.tgbotapi.types.InlineMessageId"))
typealias InlineMessageIdentifier = InlineMessageId

View File

@ -7,9 +7,9 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
data class BaseChosenInlineResult( data class BaseChosenInlineResult(
override val resultId: InlineQueryIdentifier, override val resultId: InlineQueryId,
@SerialName(fromField) @SerialName(fromField)
override val from: User, override val from: User,
override val inlineMessageId: InlineMessageIdentifier?, override val inlineMessageId: InlineMessageId?,
override val query: String override val query: String
) : ChosenInlineResult ) : ChosenInlineResult

View File

@ -1,11 +1,11 @@
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
import dev.inmo.tgbotapi.abstracts.FromUser import dev.inmo.tgbotapi.abstracts.FromUser
import dev.inmo.tgbotapi.types.InlineMessageIdentifier import dev.inmo.tgbotapi.types.InlineMessageId
import dev.inmo.tgbotapi.types.InlineQueryIdentifier import dev.inmo.tgbotapi.types.InlineQueryId
sealed interface ChosenInlineResult : FromUser { sealed interface ChosenInlineResult : FromUser {
val resultId: InlineQueryIdentifier //chosen temporary, can be changed val resultId: InlineQueryId //chosen temporary, can be changed
val inlineMessageId: InlineMessageIdentifier? val inlineMessageId: InlineMessageId?
val query: String val query: String
} }

View File

@ -8,10 +8,10 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
data class LocationChosenInlineResult( data class LocationChosenInlineResult(
override val resultId: InlineQueryIdentifier, override val resultId: InlineQueryId,
@SerialName(fromField) @SerialName(fromField)
override val from: User, override val from: User,
val location: StaticLocation, val location: StaticLocation,
override val inlineMessageId: InlineMessageIdentifier?, override val inlineMessageId: InlineMessageId?,
override val query: String override val query: String
) : ChosenInlineResult ) : ChosenInlineResult

View File

@ -9,7 +9,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
internal data class RawChosenInlineResult( internal data class RawChosenInlineResult(
@SerialName(resultIdField) @SerialName(resultIdField)
val resultId: InlineQueryIdentifier, //chosen temporary, can be changed val resultId: InlineQueryId, //chosen temporary, can be changed
@SerialName(fromField) @SerialName(fromField)
val user: User, val user: User,
@SerialName(queryField) @SerialName(queryField)
@ -17,7 +17,7 @@ internal data class RawChosenInlineResult(
@SerialName(locationField) @SerialName(locationField)
val location: StaticLocation? = null, val location: StaticLocation? = null,
@SerialName(inlineMessageIdField) @SerialName(inlineMessageIdField)
val inlineMessageId: InlineMessageIdentifier? = null val inlineMessageId: InlineMessageId? = null
) { ) {
val asChosenInlineResult: ChosenInlineResult by lazy { val asChosenInlineResult: ChosenInlineResult by lazy {
location ?.let { location ?.let {

View File

@ -10,7 +10,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
class InlineQueryResultArticle( class InlineQueryResultArticle(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(titleField) @SerialName(titleField)
override val title: String, override val title: String,
@SerialName(inputMessageContentField) @SerialName(inputMessageContentField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultAudioCachedImpl( fun InlineQueryResultAudioCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
text: String? = null, text: String? = null,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
@ -26,7 +26,7 @@ fun InlineQueryResultAudioCachedImpl(
) = InlineQueryResultAudioCachedImpl(id, fileId, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultAudioCachedImpl(id, fileId, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultAudioCachedImpl( fun InlineQueryResultAudioCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
entities: TextSourcesList, entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null, replyMarkup: InlineKeyboardMarkup? = null,
@ -44,7 +44,7 @@ fun InlineQueryResultAudioCachedImpl(
@Serializable @Serializable
data class InlineQueryResultAudioCachedImpl internal constructor( data class InlineQueryResultAudioCachedImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(audioFileIdField) @SerialName(audioFileIdField)
override val fileId: FileId, override val fileId: FileId,
@SerialName(captionField) @SerialName(captionField)

View File

@ -16,7 +16,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultAudioImpl( fun InlineQueryResultAudioImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
title: String, title: String,
performer: String? = null, performer: String? = null,
@ -28,7 +28,7 @@ fun InlineQueryResultAudioImpl(
) = InlineQueryResultAudioImpl(id, url, title, performer, duration, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultAudioImpl(id, url, title, performer, duration, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultAudioImpl( fun InlineQueryResultAudioImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
title: String, title: String,
performer: String? = null, performer: String? = null,
@ -52,7 +52,7 @@ fun InlineQueryResultAudioImpl(
@Serializable @Serializable
data class InlineQueryResultAudioImpl internal constructor( data class InlineQueryResultAudioImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(audioUrlField) @SerialName(audioUrlField)
override val url: String, override val url: String,
@SerialName(titleField) @SerialName(titleField)

View File

@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
data class InlineQueryResultContact( data class InlineQueryResultContact(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(phoneNumberField) @SerialName(phoneNumberField)
override val phoneNumber: String, override val phoneNumber: String,
@SerialName(firstNameField) @SerialName(firstNameField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultDocumentCachedImpl( fun InlineQueryResultDocumentCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String, title: String,
description: String? = null, description: String? = null,
@ -28,7 +28,7 @@ fun InlineQueryResultDocumentCachedImpl(
) = InlineQueryResultDocumentCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultDocumentCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultDocumentCachedImpl( fun InlineQueryResultDocumentCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String, title: String,
description: String? = null, description: String? = null,
@ -50,7 +50,7 @@ fun InlineQueryResultDocumentCachedImpl(
@Serializable @Serializable
data class InlineQueryResultDocumentCachedImpl internal constructor( data class InlineQueryResultDocumentCachedImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(documentFileIdField) @SerialName(documentFileIdField)
override val fileId: FileId, override val fileId: FileId,
@SerialName(titleField) @SerialName(titleField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultDocumentImpl( fun InlineQueryResultDocumentImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
title: String, title: String,
mimeType: MimeType, mimeType: MimeType,
@ -32,7 +32,7 @@ fun InlineQueryResultDocumentImpl(
) = InlineQueryResultDocumentImpl(id, url, title, mimeType, thumbnailUrl, thumbnailWidth, thumbnailHeight, description, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultDocumentImpl(id, url, title, mimeType, thumbnailUrl, thumbnailWidth, thumbnailHeight, description, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultDocumentImpl( fun InlineQueryResultDocumentImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
title: String, title: String,
mimeType: MimeType, mimeType: MimeType,
@ -62,7 +62,7 @@ fun InlineQueryResultDocumentImpl(
@Serializable @Serializable
data class InlineQueryResultDocumentImpl internal constructor( data class InlineQueryResultDocumentImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(documentUrlField) @SerialName(documentUrlField)
override val url: String, override val url: String,
@SerialName(titleField) @SerialName(titleField)

View File

@ -1,7 +1,7 @@
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueryIdentifier import dev.inmo.tgbotapi.types.InlineQueryId
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.gameShortNameField import dev.inmo.tgbotapi.types.gameShortNameField
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
@ -9,7 +9,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
class InlineQueryResultGame( class InlineQueryResultGame(
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(gameShortNameField) @SerialName(gameShortNameField)
val gameShortName: String, val gameShortName: String,
override val replyMarkup: InlineKeyboardMarkup? = null override val replyMarkup: InlineKeyboardMarkup? = null

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultGifCachedImpl( fun InlineQueryResultGifCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String? = null, title: String? = null,
text: String? = null, text: String? = null,
@ -27,7 +27,7 @@ fun InlineQueryResultGifCachedImpl(
) = InlineQueryResultGifCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultGifCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultGifCachedImpl( fun InlineQueryResultGifCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String? = null, title: String? = null,
entities: TextSourcesList, entities: TextSourcesList,
@ -47,7 +47,7 @@ fun InlineQueryResultGifCachedImpl(
@Serializable @Serializable
data class InlineQueryResultGifCachedImpl internal constructor( data class InlineQueryResultGifCachedImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(gifFileIdField) @SerialName(gifFileIdField)
override val fileId: FileId, override val fileId: FileId,
@SerialName(titleField) @SerialName(titleField)

View File

@ -18,7 +18,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultGifImpl( fun InlineQueryResultGifImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
thumbnailUrl: String, thumbnailUrl: String,
thumbnailMimeType: MimeType? = null, thumbnailMimeType: MimeType? = null,
@ -33,7 +33,7 @@ fun InlineQueryResultGifImpl(
) = InlineQueryResultGifImpl(id, url, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultGifImpl(id, url, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultGifImpl( fun InlineQueryResultGifImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
thumbnailUrl: String, thumbnailUrl: String,
thumbnailMimeType: MimeType? = null, thumbnailMimeType: MimeType? = null,
@ -61,7 +61,7 @@ fun InlineQueryResultGifImpl(
) )
fun InlineQueryResultGifImpl( fun InlineQueryResultGifImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
gifFile: FileId, gifFile: FileId,
thumbnailUrl: String, thumbnailUrl: String,
thumbnailMimeType: MimeType? = null, thumbnailMimeType: MimeType? = null,
@ -76,7 +76,7 @@ fun InlineQueryResultGifImpl(
) = InlineQueryResultGifImpl(id, gifFile.fileId, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, replyMarkup, inputMessageContent) ) = InlineQueryResultGifImpl(id, gifFile.fileId, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, replyMarkup, inputMessageContent)
fun InlineQueryResultGifImpl( fun InlineQueryResultGifImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
gifFile: FileId, gifFile: FileId,
thumbnailUrl: String, thumbnailUrl: String,
thumbnailMimeType: MimeType? = null, thumbnailMimeType: MimeType? = null,
@ -94,7 +94,7 @@ fun InlineQueryResultGifImpl(
@Serializable @Serializable
data class InlineQueryResultGifImpl internal constructor( data class InlineQueryResultGifImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(gifUrlField) @SerialName(gifUrlField)
override val url: String, override val url: String,
@SerialName(thumbnailUrlField) @SerialName(thumbnailUrlField)

View File

@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
data class InlineQueryResultLocation( data class InlineQueryResultLocation(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(latitudeField) @SerialName(latitudeField)
override val latitude: Double, override val latitude: Double,
@SerialName(longitudeField) @SerialName(longitudeField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultMpeg4GifCachedImpl( fun InlineQueryResultMpeg4GifCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String? = null, title: String? = null,
text: String? = null, text: String? = null,
@ -27,7 +27,7 @@ fun InlineQueryResultMpeg4GifCachedImpl(
) = InlineQueryResultMpeg4GifCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultMpeg4GifCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultMpeg4GifCachedImpl( fun InlineQueryResultMpeg4GifCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String? = null, title: String? = null,
entities: TextSourcesList, entities: TextSourcesList,
@ -47,7 +47,7 @@ fun InlineQueryResultMpeg4GifCachedImpl(
@Serializable @Serializable
data class InlineQueryResultMpeg4GifCachedImpl internal constructor( data class InlineQueryResultMpeg4GifCachedImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(mpeg4GifFileIdField) @SerialName(mpeg4GifFileIdField)
override val fileId: FileId, override val fileId: FileId,
@SerialName(titleField) @SerialName(titleField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultMpeg4GifImpl( fun InlineQueryResultMpeg4GifImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
thumbnailUrl: String, thumbnailUrl: String,
thumbnailMimeType: MimeType? = null, thumbnailMimeType: MimeType? = null,
@ -32,7 +32,7 @@ fun InlineQueryResultMpeg4GifImpl(
) = InlineQueryResultMpeg4GifImpl(id, url, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultMpeg4GifImpl(id, url, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultMpeg4GifImpl( fun InlineQueryResultMpeg4GifImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
thumbnailUrl: String, thumbnailUrl: String,
thumbnailMimeType: MimeType? = null, thumbnailMimeType: MimeType? = null,
@ -62,7 +62,7 @@ fun InlineQueryResultMpeg4GifImpl(
@Serializable @Serializable
data class InlineQueryResultMpeg4GifImpl internal constructor( data class InlineQueryResultMpeg4GifImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(mpeg4GifUrlField) @SerialName(mpeg4GifUrlField)
override val url: String, override val url: String,
@SerialName(thumbnailUrlField) @SerialName(thumbnailUrlField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultPhotoCachedImpl( fun InlineQueryResultPhotoCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String? = null, title: String? = null,
description: String? = null, description: String? = null,
@ -28,7 +28,7 @@ fun InlineQueryResultPhotoCachedImpl(
) = InlineQueryResultPhotoCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultPhotoCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultPhotoCachedImpl( fun InlineQueryResultPhotoCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String? = null, title: String? = null,
description: String? = null, description: String? = null,
@ -50,7 +50,7 @@ fun InlineQueryResultPhotoCachedImpl(
@Serializable @Serializable
data class InlineQueryResultPhotoCachedImpl internal constructor( data class InlineQueryResultPhotoCachedImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(photoFileIdField) @SerialName(photoFileIdField)
override val fileId: FileId, override val fileId: FileId,
@SerialName(titleField) @SerialName(titleField)

View File

@ -16,7 +16,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultPhotoImpl( fun InlineQueryResultPhotoImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
thumbnailUrl: String, thumbnailUrl: String,
width: Int? = null, width: Int? = null,
@ -30,7 +30,7 @@ fun InlineQueryResultPhotoImpl(
) = InlineQueryResultPhotoImpl(id, url, thumbnailUrl, width, height, title, description, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultPhotoImpl(id, url, thumbnailUrl, width, height, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultPhotoImpl( fun InlineQueryResultPhotoImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
thumbnailUrl: String, thumbnailUrl: String,
width: Int? = null, width: Int? = null,
@ -58,7 +58,7 @@ fun InlineQueryResultPhotoImpl(
@Serializable @Serializable
data class InlineQueryResultPhotoImpl internal constructor( data class InlineQueryResultPhotoImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(photoUrlField) @SerialName(photoUrlField)
override val url: String, override val url: String,
@SerialName(thumbnailUrlField) @SerialName(thumbnailUrlField)

View File

@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
data class InlineQueryResultStickerCached( data class InlineQueryResultStickerCached(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(stickerFileIdField) @SerialName(stickerFileIdField)
override val fileId: FileId, override val fileId: FileId,
@SerialName(replyMarkupField) @SerialName(replyMarkupField)

View File

@ -12,7 +12,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
data class InlineQueryResultVenue( data class InlineQueryResultVenue(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(latitudeField) @SerialName(latitudeField)
override val latitude: Double, override val latitude: Double,
@SerialName(longitudeField) @SerialName(longitudeField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultVideoCachedImpl( fun InlineQueryResultVideoCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String, title: String,
description: String? = null, description: String? = null,
@ -28,7 +28,7 @@ fun InlineQueryResultVideoCachedImpl(
) = InlineQueryResultVideoCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultVideoCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultVideoCachedImpl( fun InlineQueryResultVideoCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String, title: String,
description: String? = null, description: String? = null,
@ -50,7 +50,7 @@ fun InlineQueryResultVideoCachedImpl(
@Serializable @Serializable
data class InlineQueryResultVideoCachedImpl internal constructor( data class InlineQueryResultVideoCachedImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(videoFileIdField) @SerialName(videoFileIdField)
override val fileId: FileId, override val fileId: FileId,
@SerialName(titleField) @SerialName(titleField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultVideoImpl( fun InlineQueryResultVideoImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
thumbnailUrl: String, thumbnailUrl: String,
mimeType: MimeType, mimeType: MimeType,
@ -33,7 +33,7 @@ fun InlineQueryResultVideoImpl(
) = InlineQueryResultVideoImpl(id, url, thumbnailUrl, mimeType, title, width, height, duration, description, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultVideoImpl(id, url, thumbnailUrl, mimeType, title, width, height, duration, description, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultVideoImpl( fun InlineQueryResultVideoImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
thumbnailUrl: String, thumbnailUrl: String,
mimeType: MimeType, mimeType: MimeType,
@ -65,7 +65,7 @@ fun InlineQueryResultVideoImpl(
@Serializable @Serializable
data class InlineQueryResultVideoImpl internal constructor( data class InlineQueryResultVideoImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(videoUrlField) @SerialName(videoUrlField)
override val url: String, override val url: String,
@SerialName(thumbnailUrlField) @SerialName(thumbnailUrlField)

View File

@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultVoiceCachedImpl( fun InlineQueryResultVoiceCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String, title: String,
text: String? = null, text: String? = null,
@ -27,7 +27,7 @@ fun InlineQueryResultVoiceCachedImpl(
) = InlineQueryResultVoiceCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent) ) = InlineQueryResultVoiceCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent)
fun InlineQueryResultVoiceCachedImpl( fun InlineQueryResultVoiceCachedImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
fileId: FileId, fileId: FileId,
title: String, title: String,
entities: TextSourcesList, entities: TextSourcesList,
@ -47,7 +47,7 @@ fun InlineQueryResultVoiceCachedImpl(
@Serializable @Serializable
data class InlineQueryResultVoiceCachedImpl internal constructor( data class InlineQueryResultVoiceCachedImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(voiceFileIdField) @SerialName(voiceFileIdField)
override val fileId: FileId, override val fileId: FileId,
@SerialName(titleField) @SerialName(titleField)

View File

@ -16,7 +16,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
fun InlineQueryResultVoiceImpl( fun InlineQueryResultVoiceImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
title: String, title: String,
duration: Int? = null, duration: Int? = null,
@ -37,7 +37,7 @@ fun InlineQueryResultVoiceImpl(
) )
fun InlineQueryResultVoiceImpl( fun InlineQueryResultVoiceImpl(
id: InlineQueryIdentifier, id: InlineQueryId,
url: String, url: String,
title: String, title: String,
duration: Int? = null, duration: Int? = null,
@ -59,7 +59,7 @@ fun InlineQueryResultVoiceImpl(
@Serializable @Serializable
data class InlineQueryResultVoiceImpl internal constructor( data class InlineQueryResultVoiceImpl internal constructor(
@SerialName(idField) @SerialName(idField)
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
@SerialName(voiceUrlField) @SerialName(voiceUrlField)
override val url: String, override val url: String,
@SerialName(titleField) @SerialName(titleField)

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.serializers.InlineQueryResultSerializer import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.serializers.InlineQueryResultSerializer
import dev.inmo.tgbotapi.types.InlineQueryIdentifier import dev.inmo.tgbotapi.types.InlineQueryId
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@ -10,6 +10,6 @@ import kotlinx.serialization.Serializable
@ClassCastsIncluded(excludeRegex = ".*Impl") @ClassCastsIncluded(excludeRegex = ".*Impl")
interface InlineQueryResult { interface InlineQueryResult {
val type: String val type: String
val id: InlineQueryIdentifier val id: InlineQueryId
val replyMarkup: InlineKeyboardMarkup? val replyMarkup: InlineKeyboardMarkup?
} }

View File

@ -1,12 +1,11 @@
package dev.inmo.tgbotapi.types.InlineQueries.query package dev.inmo.tgbotapi.types.InlineQueries.query
import dev.inmo.tgbotapi.types.InlineQueryIdentifier import dev.inmo.tgbotapi.types.InlineQueryId
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.chat.ChatType import dev.inmo.tgbotapi.types.chat.ChatType
import dev.inmo.tgbotapi.types.chat.CommonUser import dev.inmo.tgbotapi.types.chat.CommonUser
data class BaseInlineQuery( data class BaseInlineQuery(
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
override val from: CommonUser, override val from: CommonUser,
override val query: String, override val query: String,
override val offset: String, override val offset: String,

View File

@ -1,13 +1,12 @@
package dev.inmo.tgbotapi.types.InlineQueries.query package dev.inmo.tgbotapi.types.InlineQueries.query
import dev.inmo.tgbotapi.abstracts.FromUser import dev.inmo.tgbotapi.abstracts.FromUser
import dev.inmo.tgbotapi.types.InlineQueryIdentifier import dev.inmo.tgbotapi.types.InlineQueryId
import dev.inmo.tgbotapi.types.chat.ChatType import dev.inmo.tgbotapi.types.chat.ChatType
import dev.inmo.tgbotapi.types.chat.CommonUser import dev.inmo.tgbotapi.types.chat.CommonUser
import dev.inmo.tgbotapi.types.chat.User
sealed interface InlineQuery : FromUser { sealed interface InlineQuery : FromUser {
val id: InlineQueryIdentifier val id: InlineQueryId
val query: String val query: String
val offset: String val offset: String
val chatType: ChatType? val chatType: ChatType?

View File

@ -1,13 +1,12 @@
package dev.inmo.tgbotapi.types.InlineQueries.query package dev.inmo.tgbotapi.types.InlineQueries.query
import dev.inmo.tgbotapi.types.InlineQueryIdentifier import dev.inmo.tgbotapi.types.InlineQueryId
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.chat.ChatType import dev.inmo.tgbotapi.types.chat.ChatType
import dev.inmo.tgbotapi.types.chat.CommonUser import dev.inmo.tgbotapi.types.chat.CommonUser
import dev.inmo.tgbotapi.types.location.Location import dev.inmo.tgbotapi.types.location.Location
data class LocationInlineQuery( data class LocationInlineQuery(
override val id: InlineQueryIdentifier, override val id: InlineQueryId,
override val from: CommonUser, override val from: CommonUser,
override val query: String, override val query: String,
override val offset: String, override val offset: String,

View File

@ -2,7 +2,6 @@ package dev.inmo.tgbotapi.types.InlineQueries.query
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.* import dev.inmo.tgbotapi.types.chat.*
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.location.Location import dev.inmo.tgbotapi.types.location.Location
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@ -10,7 +9,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
internal data class RawInlineQuery( internal data class RawInlineQuery(
@SerialName(idField) @SerialName(idField)
val id: InlineQueryIdentifier, val id: InlineQueryId,
@SerialName(fromField) @SerialName(fromField)
val from: CommonUser, val from: CommonUser,
@SerialName(queryField) @SerialName(queryField)

View File

@ -0,0 +1,17 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class InlineQueryId(
val string: String
) {
override fun toString(): String {
return string
}
}
@Deprecated("Renamed", ReplaceWith("InlineQueryId", "dev.inmo.tgbotapi.types.InlineQueryId"))
typealias InlineQueryIdentifier = InlineQueryId

View File

@ -0,0 +1,17 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class MediaGroupId(
val string: String
) {
override fun toString(): String {
return string
}
}
@Deprecated("Renamed", ReplaceWith("MediaGroupId", "dev.inmo.tgbotapi.types.MediaGroupId"))
typealias MediaGroupIdentifier = MediaGroupId

View File

@ -1,24 +1,41 @@
package dev.inmo.tgbotapi.types package dev.inmo.tgbotapi.types
import kotlinx.serialization.KSerializer import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.encoding.Encoder
import kotlinx.serialization.json.* import kotlinx.serialization.json.*
import kotlin.jvm.JvmInline
object MessageIdSerializer : KSerializer<MessageId> { object MessageIdSerializer : KSerializer<MessageId> {
override val descriptor: SerialDescriptor = JsonObject.serializer().descriptor override val descriptor: SerialDescriptor = JsonObject.serializer().descriptor
override fun deserialize(decoder: Decoder): MessageId = JsonObject.serializer().deserialize(decoder)[messageIdField]!!.jsonPrimitive.long override fun deserialize(decoder: Decoder): MessageId = JsonObject.serializer().deserialize(decoder)[messageIdField]!!.jsonPrimitive.long.asTelegramMessageId()
override fun serialize(encoder: Encoder, value: MessageId) { override fun serialize(encoder: Encoder, value: MessageId) {
JsonObject.serializer().serialize( JsonObject.serializer().serialize(
encoder, encoder,
JsonObject( JsonObject(
mapOf( mapOf(
messageIdField to JsonPrimitive(value) messageIdField to JsonPrimitive(value.long)
) )
) )
) )
} }
} }
@Serializable
@JvmInline
value class MessageId(
val long: Long
) {
override fun toString(): String {
return long.toString()
}
}
fun Long.asTelegramMessageId() = MessageId(this)
@Deprecated("Renamed", ReplaceWith("MessageId", "dev.inmo.tgbotapi.types.MessageId"))
typealias MessageIdentifier = MessageId

View File

@ -0,0 +1,14 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class MessageThreadId(
val long: Long
) {
override fun toString(): String {
return long.toString()
}
}

View File

@ -0,0 +1,16 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class PollId(
val string: String
) {
override fun toString(): String {
return string
}
}
@Deprecated("Renamed", ReplaceWith("PollId", "dev.inmo.tgbotapi.types.PollId"))
typealias PollIdentifier = String

View File

@ -0,0 +1,14 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class PreCheckoutQueryId(
val string: String
) {
override fun toString(): String {
return string
}
}

View File

@ -0,0 +1,20 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class RawChatId(
val long: Long
) {
companion object {
val DefaultUserId = RawChatId(136817688L) // I do not know why, it is Telegram crutch
}
override fun toString(): String {
return long.toString()
}
}
@Deprecated("Renamed", ReplaceWith("RawChatId", "dev.inmo.tgbotapi.types.RawChatId"))
typealias Identifier = RawChatId

View File

@ -0,0 +1,16 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class ShippingOptionId(
val string: String
) {
override fun toString(): String {
return string
}
}
@Deprecated("ShippingOptionId", ReplaceWith("ShippingOptionId", "dev.inmo.tgbotapi.types.ShippingOptionId"))
typealias ShippingOptionIdentifier = ShippingOptionId

Some files were not shown because too many files have changed in this diff Show More