add webAppButton overload with url as string

This commit is contained in:
InsanusMokrassar 2022-04-19 13:52:08 +06:00
parent 1d42f86623
commit cf27600fb5
1 changed files with 11 additions and 0 deletions

View File

@ -140,3 +140,14 @@ inline fun InlineKeyboardRowBuilder.webAppButton(
text: String,
webApp: WebAppInfo
) = add(WebAppInlineKeyboardButton(text, webApp))
/**
* Creates and put [WebAppInlineKeyboardButton]. Please, remember that this button is available in private chats only
*
* @see inlineKeyboard
* @see InlineKeyboardBuilder.row
*/
inline fun InlineKeyboardRowBuilder.webAppButton(
text: String,
url: String
) = webAppButton(text, WebAppInfo(url))