mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-04-07 02:22:27 +00:00
add support of KeyboardButtonRequestManagedBot
This commit is contained in:
@@ -5,6 +5,7 @@ package dev.inmo.tgbotapi.extensions.utils.types.buttons
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.*
|
||||
import dev.inmo.tgbotapi.types.buttons.reply.requestChatReplyButton
|
||||
import dev.inmo.tgbotapi.types.buttons.reply.requestManagedBotReplyButton
|
||||
import dev.inmo.tgbotapi.types.buttons.reply.requestUserReplyButton
|
||||
import dev.inmo.tgbotapi.types.buttons.reply.requestUsersReplyButton
|
||||
import dev.inmo.tgbotapi.types.chat.member.ChatCommonAdministratorRights
|
||||
@@ -467,3 +468,47 @@ fun ReplyKeyboardRowBuilder.requestGroupButton(
|
||||
iconCustomEmojiId,
|
||||
style
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates and put [RequestManagedBotKeyboardButton]
|
||||
*
|
||||
* @see replyKeyboard
|
||||
* @see ReplyKeyboardBuilder.row
|
||||
*/
|
||||
fun ReplyKeyboardRowBuilder.requestManagedBotButton(
|
||||
text: String,
|
||||
requestManagedBot: KeyboardButtonRequestManagedBot,
|
||||
iconCustomEmojiId: CustomEmojiId? = null,
|
||||
style: KeyboardButtonStyle? = null
|
||||
) = add(
|
||||
requestManagedBotReplyButton(
|
||||
text,
|
||||
requestManagedBot,
|
||||
iconCustomEmojiId,
|
||||
style
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates and put [RequestManagedBotKeyboardButton] with [KeyboardButtonRequestManagedBot]
|
||||
*
|
||||
* @see replyKeyboard
|
||||
* @see ReplyKeyboardBuilder.row
|
||||
*/
|
||||
fun ReplyKeyboardRowBuilder.requestManagedBotButton(
|
||||
text: String,
|
||||
requestId: RequestId,
|
||||
suggestedName: String? = null,
|
||||
suggestedUsername: Username? = null,
|
||||
iconCustomEmojiId: CustomEmojiId? = null,
|
||||
style: KeyboardButtonStyle? = null
|
||||
) = requestManagedBotButton(
|
||||
text,
|
||||
KeyboardButtonRequestManagedBot(
|
||||
requestId = requestId,
|
||||
suggestedName = suggestedName,
|
||||
suggestedUsername = suggestedUsername,
|
||||
),
|
||||
iconCustomEmojiId,
|
||||
style
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user