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

add support of SwitchInlineQueryChosenChatInlineKeyboardButton

This commit is contained in:
2023-04-21 21:42:40 +06:00
parent 61a6d4a880
commit 44e6d7adbc
6 changed files with 113 additions and 0 deletions

View File

@@ -103,6 +103,41 @@ inline fun InlineKeyboardRowBuilder.inlineQueryInCurrentChatButton(
data: String
) = add(SwitchInlineQueryCurrentChatInlineKeyboardButton(text, data))
/**
* Creates and put [SwitchInlineQueryChosenChatInlineKeyboardButton]
*
* @see inlineKeyboard
* @see InlineKeyboardBuilder.row
*/
inline fun InlineKeyboardRowBuilder.inlineQueryInChosenChatButton(
text: String,
parameters: SwitchInlineQueryChosenChat
) = add(SwitchInlineQueryChosenChatInlineKeyboardButton(text, parameters))
/**
* Creates and put [SwitchInlineQueryChosenChatInlineKeyboardButton]
*
* @see inlineKeyboard
* @see InlineKeyboardBuilder.row
*/
inline fun InlineKeyboardRowBuilder.inlineQueryInChosenChatButton(
text: String,
query: String? = null,
allowUsers: Boolean? = null,
allowBots: Boolean? = null,
allowGroups: Boolean? = null,
allowChannels: Boolean? = null,
) = inlineQueryInChosenChatButton(
text,
SwitchInlineQueryChosenChat(
query = query,
allowUsers = allowUsers,
allowBots = allowBots,
allowGroups = allowGroups,
allowChannels = allowChannels
)
)
/**
* Creates and put [SwitchInlineQueryInlineKeyboardButton]
*