1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 23:29:33 +00:00

fill changelog and fix several issues

This commit is contained in:
2023-02-06 12:41:19 +06:00
parent 8e02a702f1
commit f81d28dd5f
4 changed files with 35 additions and 2 deletions

View File

@@ -436,6 +436,7 @@ import dev.inmo.tgbotapi.types.queries.callback.MessageGameShortNameCallbackQuer
import dev.inmo.tgbotapi.types.queries.callback.UnknownCallbackQueryType
import dev.inmo.tgbotapi.types.request.ChatShared
import dev.inmo.tgbotapi.types.request.ChatSharedRequest
import dev.inmo.tgbotapi.types.request.RequestResponse
import dev.inmo.tgbotapi.types.request.UserShared
import dev.inmo.tgbotapi.types.update.CallbackQueryUpdate
import dev.inmo.tgbotapi.types.update.ChannelPostUpdate
@@ -4718,6 +4719,33 @@ public inline fun Poll.quizPollOrThrow(): QuizPoll = this as dev.inmo.tgbotapi.t
public inline fun <T> Poll.ifQuizPoll(block: (QuizPoll) -> T): T? = quizPollOrNull() ?.let(block)
public inline fun RequestResponse.chatSharedOrNull(): ChatShared? = this as?
dev.inmo.tgbotapi.types.request.ChatShared
public inline fun RequestResponse.chatSharedOrThrow(): ChatShared = this as
dev.inmo.tgbotapi.types.request.ChatShared
public inline fun <T> RequestResponse.ifChatShared(block: (ChatShared) -> T): T? =
chatSharedOrNull() ?.let(block)
public inline fun RequestResponse.chatSharedRequestOrNull(): ChatSharedRequest? = this as?
dev.inmo.tgbotapi.types.request.ChatSharedRequest
public inline fun RequestResponse.chatSharedRequestOrThrow(): ChatSharedRequest = this as
dev.inmo.tgbotapi.types.request.ChatSharedRequest
public inline fun <T> RequestResponse.ifChatSharedRequest(block: (ChatSharedRequest) -> T): T? =
chatSharedRequestOrNull() ?.let(block)
public inline fun RequestResponse.userSharedOrNull(): UserShared? = this as?
dev.inmo.tgbotapi.types.request.UserShared
public inline fun RequestResponse.userSharedOrThrow(): UserShared = this as
dev.inmo.tgbotapi.types.request.UserShared
public inline fun <T> RequestResponse.ifUserShared(block: (UserShared) -> T): T? =
userSharedOrNull() ?.let(block)
public inline fun Update.callbackQueryUpdateOrNull(): CallbackQueryUpdate? = this as?
dev.inmo.tgbotapi.types.update.CallbackQueryUpdate