mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
update kdocs of buttons creation shortcuts
This commit is contained in:
parent
e6dbf2bde9
commit
d4e11494e8
@ -5,20 +5,14 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.*
|
|||||||
import dev.inmo.tgbotapi.types.webapps.WebAppInfo
|
import dev.inmo.tgbotapi.types.webapps.WebAppInfo
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [PayInlineKeyboardButton]
|
* Creates [PayInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun payInlineButton(
|
inline fun payInlineButton(
|
||||||
text: String
|
text: String
|
||||||
) = PayInlineKeyboardButton(text)
|
) = PayInlineKeyboardButton(text)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [CallbackDataInlineKeyboardButton]
|
* Creates [CallbackDataInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun dataInlineButton(
|
inline fun dataInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -26,20 +20,14 @@ inline fun dataInlineButton(
|
|||||||
) = CallbackDataInlineKeyboardButton(text, data)
|
) = CallbackDataInlineKeyboardButton(text, data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [CallbackGameInlineKeyboardButton]
|
* Creates [CallbackGameInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun gameInlineButton(
|
inline fun gameInlineButton(
|
||||||
text: String
|
text: String
|
||||||
) = CallbackGameInlineKeyboardButton(text)
|
) = CallbackGameInlineKeyboardButton(text)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [LoginURLInlineKeyboardButton]
|
* Creates [LoginURLInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun loginInlineButton(
|
inline fun loginInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -47,10 +35,7 @@ inline fun loginInlineButton(
|
|||||||
) = LoginURLInlineKeyboardButton(text, loginUrl)
|
) = LoginURLInlineKeyboardButton(text, loginUrl)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [SwitchInlineQueryCurrentChatInlineKeyboardButton]
|
* Creates [SwitchInlineQueryCurrentChatInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun inlineQueryInCurrentChatInlineButton(
|
inline fun inlineQueryInCurrentChatInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -58,10 +43,7 @@ inline fun inlineQueryInCurrentChatInlineButton(
|
|||||||
) = SwitchInlineQueryCurrentChatInlineKeyboardButton(text, data)
|
) = SwitchInlineQueryCurrentChatInlineKeyboardButton(text, data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [SwitchInlineQueryChosenChatInlineKeyboardButton]
|
* Creates [SwitchInlineQueryChosenChatInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun inlineQueryInCurrentChatInlineButton(
|
inline fun inlineQueryInCurrentChatInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -69,10 +51,7 @@ inline fun inlineQueryInCurrentChatInlineButton(
|
|||||||
) = SwitchInlineQueryChosenChatInlineKeyboardButton(text, parameters)
|
) = SwitchInlineQueryChosenChatInlineKeyboardButton(text, parameters)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [SwitchInlineQueryChosenChatInlineKeyboardButton]
|
* Creates [SwitchInlineQueryChosenChatInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun inlineQueryInCurrentChatInlineButton(
|
inline fun inlineQueryInCurrentChatInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -93,10 +72,7 @@ inline fun inlineQueryInCurrentChatInlineButton(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [SwitchInlineQueryChosenChatInlineKeyboardButton]
|
* Creates [SwitchInlineQueryChosenChatInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun inlineQueryInAnyCurrentChatInlineButton(
|
inline fun inlineQueryInAnyCurrentChatInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -104,10 +80,7 @@ inline fun inlineQueryInAnyCurrentChatInlineButton(
|
|||||||
) = inlineQueryInCurrentChatInlineButton(text, query, allowUsers = true, allowBots = true, allowGroups = true, allowChannels = true)
|
) = inlineQueryInCurrentChatInlineButton(text, query, allowUsers = true, allowBots = true, allowGroups = true, allowChannels = true)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [SwitchInlineQueryInlineKeyboardButton]
|
* Creates [SwitchInlineQueryInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun inlineQueryInlineButton(
|
inline fun inlineQueryInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -115,10 +88,7 @@ inline fun inlineQueryInlineButton(
|
|||||||
) = SwitchInlineQueryInlineKeyboardButton(text, data)
|
) = SwitchInlineQueryInlineKeyboardButton(text, data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [URLInlineKeyboardButton]
|
* Creates [URLInlineKeyboardButton]
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun urlInlineButton(
|
inline fun urlInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -126,10 +96,7 @@ inline fun urlInlineButton(
|
|||||||
) = URLInlineKeyboardButton(text, url)
|
) = URLInlineKeyboardButton(text, url)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [WebAppInlineKeyboardButton]. Please, remember that this button is available in private chats only
|
* Creates [WebAppInlineKeyboardButton]. Please, remember that this button is available in private chats only
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun webAppInlineButton(
|
inline fun webAppInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -137,10 +104,7 @@ inline fun webAppInlineButton(
|
|||||||
) = WebAppInlineKeyboardButton(text, webApp)
|
) = WebAppInlineKeyboardButton(text, webApp)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [WebAppInlineKeyboardButton]. Please, remember that this button is available in private chats only
|
* Creates [WebAppInlineKeyboardButton]. Please, remember that this button is available in private chats only
|
||||||
*
|
|
||||||
* @see inlineKeyboard
|
|
||||||
* @see InlineKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun webAppInlineButton(
|
inline fun webAppInlineButton(
|
||||||
text: String,
|
text: String,
|
||||||
|
@ -8,40 +8,28 @@ import dev.inmo.tgbotapi.types.webapps.WebAppInfo
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [SimpleKeyboardButton]
|
* Creates [SimpleKeyboardButton]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun simpleReplyButton(
|
inline fun simpleReplyButton(
|
||||||
text: String
|
text: String
|
||||||
) = SimpleKeyboardButton(text)
|
) = SimpleKeyboardButton(text)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestContactKeyboardButton]
|
* Creates [RequestContactKeyboardButton]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestContactReplyButton(
|
inline fun requestContactReplyButton(
|
||||||
text: String
|
text: String
|
||||||
) = RequestContactKeyboardButton(text)
|
) = RequestContactKeyboardButton(text)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestLocationKeyboardButton]
|
* Creates [RequestLocationKeyboardButton]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestLocationReplyButton(
|
inline fun requestLocationReplyButton(
|
||||||
text: String
|
text: String
|
||||||
) = RequestLocationKeyboardButton(text)
|
) = RequestLocationKeyboardButton(text)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestPollKeyboardButton]
|
* Creates [RequestPollKeyboardButton]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestPollReplyButton(
|
inline fun requestPollReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -49,10 +37,7 @@ inline fun requestPollReplyButton(
|
|||||||
) = RequestPollKeyboardButton(text, pollType)
|
) = RequestPollKeyboardButton(text, pollType)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [WebAppKeyboardButton]
|
* Creates [WebAppKeyboardButton]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun webAppReplyButton(
|
inline fun webAppReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -60,10 +45,7 @@ inline fun webAppReplyButton(
|
|||||||
) = WebAppKeyboardButton(text, webApp)
|
) = WebAppKeyboardButton(text, webApp)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [WebAppKeyboardButton]
|
* Creates [WebAppKeyboardButton]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun webAppReplyButton(
|
inline fun webAppReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -72,10 +54,7 @@ inline fun webAppReplyButton(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestUserKeyboardButton]
|
* Creates [RequestUserKeyboardButton]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestUserReplyButton(
|
inline fun requestUserReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -86,10 +65,7 @@ inline fun requestUserReplyButton(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Bot]
|
* Creates [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Bot]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestBotReplyButton(
|
inline fun requestBotReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -100,10 +76,7 @@ inline fun requestBotReplyButton(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Common]
|
* Creates [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Common]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestUserReplyButton(
|
inline fun requestUserReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -115,10 +88,7 @@ inline fun requestUserReplyButton(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Any]
|
* Creates [RequestUserKeyboardButton] with [KeyboardButtonRequestUser.Any]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestUserOrBotReplyButton(
|
inline fun requestUserOrBotReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -130,10 +100,7 @@ inline fun requestUserOrBotReplyButton(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestChatKeyboardButton]
|
* Creates [RequestChatKeyboardButton]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestChatReplyButton(
|
inline fun requestChatReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -144,10 +111,7 @@ inline fun requestChatReplyButton(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestChatKeyboardButton] with [KeyboardButtonRequestChat]
|
* Creates [RequestChatKeyboardButton] with [KeyboardButtonRequestChat]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestChatReplyButton(
|
inline fun requestChatReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -174,10 +138,7 @@ inline fun requestChatReplyButton(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestChatKeyboardButton] with [KeyboardButtonRequestChat.Channel]
|
* Creates [RequestChatKeyboardButton] with [KeyboardButtonRequestChat.Channel]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestChannelReplyButton(
|
inline fun requestChannelReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
@ -201,10 +162,7 @@ inline fun requestChannelReplyButton(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [RequestChatKeyboardButton] with [KeyboardButtonRequestChat.Group]
|
* Creates [RequestChatKeyboardButton] with [KeyboardButtonRequestChat.Group]
|
||||||
*
|
|
||||||
* @see replyKeyboard
|
|
||||||
* @see ReplyKeyboardBuilder.row
|
|
||||||
*/
|
*/
|
||||||
inline fun requestChannelReplyButton(
|
inline fun requestChannelReplyButton(
|
||||||
text: String,
|
text: String,
|
||||||
|
Loading…
Reference in New Issue
Block a user