2022-09-28 14:38:16 +00:00
|
|
|
package dev.inmo.tgbotapi.types.buttons.reply
|
|
|
|
|
|
|
|
import dev.inmo.tgbotapi.types.buttons.*
|
|
|
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.*
|
2023-02-05 14:46:12 +00:00
|
|
|
import dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRights
|
|
|
|
import dev.inmo.tgbotapi.types.request.RequestId
|
2022-09-28 14:38:16 +00:00
|
|
|
import dev.inmo.tgbotapi.types.webapps.WebAppInfo
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates and put [SimpleKeyboardButton]
|
|
|
|
*
|
|
|
|
* @see replyKeyboard
|
|
|
|
* @see ReplyKeyboardBuilder.row
|
|
|
|
*/
|
|
|
|
inline fun simpleReplyButton(
|
|
|
|
text: String
|
|
|
|
) = SimpleKeyboardButton(text)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates and put [RequestContactKeyboardButton]
|
|
|
|
*
|
|
|
|
* @see replyKeyboard
|
|
|
|
* @see ReplyKeyboardBuilder.row
|
|
|
|
*/
|
|
|
|
inline fun requestContactReplyButton(
|
|
|
|
text: String
|
|
|
|
) = RequestContactKeyboardButton(text)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates and put [RequestLocationKeyboardButton]
|
|
|
|
*
|
|
|
|
* @see replyKeyboard
|
|
|
|
* @see ReplyKeyboardBuilder.row
|
|
|
|
*/
|
|
|
|
inline fun requestLocationReplyButton(
|
|
|
|
text: String
|
|
|
|
) = RequestLocationKeyboardButton(text)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates and put [RequestPollKeyboardButton]
|
|
|
|
*
|
|
|
|
* @see replyKeyboard
|
|
|
|
* @see ReplyKeyboardBuilder.row
|
|
|
|
*/
|
|
|
|
inline fun requestPollReplyButton(
|
|
|
|
text: String,
|
|
|
|
pollType: KeyboardButtonPollType
|
|
|
|
) = RequestPollKeyboardButton(text, pollType)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates and put [WebAppKeyboardButton]
|
|
|
|
*
|
|
|
|
* @see replyKeyboard
|
|
|
|
* @see ReplyKeyboardBuilder.row
|
|
|
|
*/
|
|
|
|
inline fun webAppReplyButton(
|
|
|
|
text: String,
|
|
|
|
webApp: WebAppInfo
|
|
|
|
) = WebAppKeyboardButton(text, webApp)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates and put [WebAppKeyboardButton]
|
|
|
|
*
|
|
|
|
* @see replyKeyboard
|
|
|
|
* @see ReplyKeyboardBuilder.row
|
|
|
|
*/
|
|
|
|
inline fun webAppReplyButton(
|
|
|
|
text: String,
|
|
|
|
url: String
|
|
|
|
) = webAppReplyButton(text, WebAppInfo(url))
|