mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 23:29:33 +00:00
update user shared to users shared
This commit is contained in:
@@ -102,7 +102,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.URLInlineKeyboardBu
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.WebAppInlineKeyboardButton
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUser
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.buttons.ReplyForce
|
||||
import dev.inmo.tgbotapi.types.buttons.ReplyKeyboardMarkup
|
||||
@@ -420,7 +420,7 @@ import dev.inmo.tgbotapi.types.reactions.Reaction
|
||||
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.request.UsersShared
|
||||
import dev.inmo.tgbotapi.types.update.CallbackQueryUpdate
|
||||
import dev.inmo.tgbotapi.types.update.ChannelPostUpdate
|
||||
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
|
||||
@@ -1735,32 +1735,32 @@ public inline fun <T>
|
||||
InlineKeyboardButton.ifWebAppInlineKeyboardButton(block: (WebAppInlineKeyboardButton) -> T): T?
|
||||
= webAppInlineKeyboardButtonOrNull() ?.let(block)
|
||||
|
||||
public inline fun KeyboardButtonRequestUser.anyOrNull(): KeyboardButtonRequestUser.Any? = this as?
|
||||
dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUser.Any
|
||||
public inline fun KeyboardButtonRequestUsers.anyOrNull(): KeyboardButtonRequestUsers.Any? = this as?
|
||||
dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Any
|
||||
|
||||
public inline fun KeyboardButtonRequestUser.anyOrThrow(): KeyboardButtonRequestUser.Any = this as
|
||||
dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUser.Any
|
||||
public inline fun KeyboardButtonRequestUsers.anyOrThrow(): KeyboardButtonRequestUsers.Any = this as
|
||||
dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Any
|
||||
|
||||
public inline fun <T> KeyboardButtonRequestUser.ifAny(block: (KeyboardButtonRequestUser.Any) -> T):
|
||||
public inline fun <T> KeyboardButtonRequestUsers.ifAny(block: (KeyboardButtonRequestUsers.Any) -> T):
|
||||
T? = anyOrNull() ?.let(block)
|
||||
|
||||
public inline fun KeyboardButtonRequestUser.botOrNull(): KeyboardButtonRequestUser.Bot? = this as?
|
||||
dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUser.Bot
|
||||
public inline fun KeyboardButtonRequestUsers.botOrNull(): KeyboardButtonRequestUsers.Bot? = this as?
|
||||
dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot
|
||||
|
||||
public inline fun KeyboardButtonRequestUser.botOrThrow(): KeyboardButtonRequestUser.Bot = this as
|
||||
dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUser.Bot
|
||||
public inline fun KeyboardButtonRequestUsers.botOrThrow(): KeyboardButtonRequestUsers.Bot = this as
|
||||
dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot
|
||||
|
||||
public inline fun <T> KeyboardButtonRequestUser.ifBot(block: (KeyboardButtonRequestUser.Bot) -> T):
|
||||
public inline fun <T> KeyboardButtonRequestUsers.ifBot(block: (KeyboardButtonRequestUsers.Bot) -> T):
|
||||
T? = botOrNull() ?.let(block)
|
||||
|
||||
public inline fun KeyboardButtonRequestUser.commonOrNull(): KeyboardButtonRequestUser.Common? = this
|
||||
as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUser.Common
|
||||
public inline fun KeyboardButtonRequestUsers.commonOrNull(): KeyboardButtonRequestUsers.Common? = this
|
||||
as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Common
|
||||
|
||||
public inline fun KeyboardButtonRequestUser.commonOrThrow(): KeyboardButtonRequestUser.Common = this
|
||||
as dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUser.Common
|
||||
public inline fun KeyboardButtonRequestUsers.commonOrThrow(): KeyboardButtonRequestUsers.Common = this
|
||||
as dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Common
|
||||
|
||||
public inline fun <T>
|
||||
KeyboardButtonRequestUser.ifCommon(block: (KeyboardButtonRequestUser.Common) -> T): T? =
|
||||
KeyboardButtonRequestUsers.ifCommon(block: (KeyboardButtonRequestUsers.Common) -> T): T? =
|
||||
commonOrNull() ?.let(block)
|
||||
|
||||
public inline fun KeyboardMarkup.inlineKeyboardMarkupOrNull(): InlineKeyboardMarkup? = this as?
|
||||
@@ -2972,13 +2972,13 @@ public inline fun ChatEvent.chatSharedRequestOrThrow(): ChatSharedRequest = this
|
||||
public inline fun <T> ChatEvent.ifChatSharedRequest(block: (ChatSharedRequest) -> T): T? =
|
||||
chatSharedRequestOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.userSharedOrNull(): UserShared? = this as?
|
||||
dev.inmo.tgbotapi.types.request.UserShared
|
||||
public inline fun ChatEvent.userSharedOrNull(): UsersShared? = this as?
|
||||
dev.inmo.tgbotapi.types.request.UsersShared
|
||||
|
||||
public inline fun ChatEvent.userSharedOrThrow(): UserShared = this as
|
||||
dev.inmo.tgbotapi.types.request.UserShared
|
||||
public inline fun ChatEvent.userSharedOrThrow(): UsersShared = this as
|
||||
dev.inmo.tgbotapi.types.request.UsersShared
|
||||
|
||||
public inline fun <T> ChatEvent.ifUserShared(block: (UserShared) -> T): T? = userSharedOrNull()
|
||||
public inline fun <T> ChatEvent.ifUserShared(block: (UsersShared) -> T): T? = userSharedOrNull()
|
||||
?.let(block)
|
||||
|
||||
public inline fun ForwardInfo.byAnonymousOrNull(): ForwardInfo.ByAnonymous? = this as?
|
||||
@@ -4564,13 +4564,13 @@ public inline fun RequestResponse.chatSharedRequestOrThrow(): 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.userSharedOrNull(): UsersShared? = this as?
|
||||
dev.inmo.tgbotapi.types.request.UsersShared
|
||||
|
||||
public inline fun RequestResponse.userSharedOrThrow(): UserShared = this as
|
||||
dev.inmo.tgbotapi.types.request.UserShared
|
||||
public inline fun RequestResponse.userSharedOrThrow(): UsersShared = this as
|
||||
dev.inmo.tgbotapi.types.request.UsersShared
|
||||
|
||||
public inline fun <T> RequestResponse.ifUserShared(block: (UserShared) -> T): T? =
|
||||
public inline fun <T> RequestResponse.ifUserShared(block: (UsersShared) -> T): T? =
|
||||
userSharedOrNull() ?.let(block)
|
||||
|
||||
public inline fun Update.callbackQueryUpdateOrNull(): CallbackQueryUpdate? = this as?
|
||||
|
@@ -139,7 +139,7 @@ inline fun ReplyKeyboardRowBuilder.webAppButton(
|
||||
*/
|
||||
inline fun ReplyKeyboardRowBuilder.requestUserButton(
|
||||
text: String,
|
||||
requestUser: KeyboardButtonRequestUser
|
||||
requestUser: KeyboardButtonRequestUsers
|
||||
) = add(
|
||||
requestUserReplyButton(
|
||||
text,
|
||||
@@ -148,7 +148,7 @@ inline fun ReplyKeyboardRowBuilder.requestUserButton(
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Bot]
|
||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUsers.Bot]
|
||||
*
|
||||
* @see replyKeyboard
|
||||
* @see ReplyKeyboardBuilder.row
|
||||
@@ -158,11 +158,11 @@ inline fun ReplyKeyboardRowBuilder.requestBotButton(
|
||||
requestId: RequestId
|
||||
) = requestUserButton(
|
||||
text,
|
||||
KeyboardButtonRequestUser.Bot(requestId)
|
||||
KeyboardButtonRequestUsers.Bot(requestId)
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Common]
|
||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUsers.Common]
|
||||
*
|
||||
* @see replyKeyboard
|
||||
* @see ReplyKeyboardBuilder.row
|
||||
@@ -173,11 +173,11 @@ inline fun ReplyKeyboardRowBuilder.requestUserButton(
|
||||
premiumUser: Boolean? = null
|
||||
) = requestUserButton(
|
||||
text,
|
||||
KeyboardButtonRequestUser.Common(requestId, premiumUser)
|
||||
KeyboardButtonRequestUsers.Common(requestId, premiumUser)
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Any]
|
||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUsers.Any]
|
||||
*
|
||||
* @see replyKeyboard
|
||||
* @see ReplyKeyboardBuilder.row
|
||||
@@ -187,7 +187,7 @@ inline fun ReplyKeyboardRowBuilder.requestUserOrBotButton(
|
||||
requestId: RequestId
|
||||
) = requestUserButton(
|
||||
text,
|
||||
KeyboardButtonRequestUser.Any(requestId)
|
||||
KeyboardButtonRequestUsers.Any(requestId)
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user