mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-11-23 12:13:25 +00:00
add support of KeyboardButtonRequestManagedBot
This commit is contained in:
1 parent
661b846a74
commit
e604b7a3bf
5 files changed
+129
-1
No files matched your search
+45
@@ -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