1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

BotCommand

This commit is contained in:
InsanusMokrassar 2020-03-30 21:40:36 +06:00
parent 1d3736c44e
commit 54589ed17b
3 changed files with 17 additions and 0 deletions

View File

@ -31,6 +31,7 @@
* Request `SendDice` was added (calling [sendDice](https://core.telegram.org/bots/api#senddice)) * Request `SendDice` was added (calling [sendDice](https://core.telegram.org/bots/api#senddice))
* Class `Dice` was added (type [dice](https://core.telegram.org/bots/api#dice)) * Class `Dice` was added (type [dice](https://core.telegram.org/bots/api#dice))
* Class `DiceContent` was added (for including it in [message](https://core.telegram.org/bots/api#message) object) * Class `DiceContent` was added (for including it in [message](https://core.telegram.org/bots/api#message) object)
* `BotCommand` was added
* `TelegramBotAPI-extensions-api`: * `TelegramBotAPI-extensions-api`:
* Extensions `sendDice` was added * Extensions `sendDice` was added

View File

@ -0,0 +1,12 @@
package com.github.insanusmokrassar.TelegramBotAPI.types
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class BotCommand(
@SerialName(botCommandField)
val command: String,
@SerialName(descriptionField)
val description: String
)

View File

@ -48,6 +48,9 @@ val customTitleLength = 0 .. 16
val diceResultLimit = 1 .. 6 val diceResultLimit = 1 .. 6
val botCommandLimit = 1 .. 32
val botCommandDescriptionLimit = 3 .. 256
const val chatIdField = "chat_id" const val chatIdField = "chat_id"
const val messageIdField = "message_id" const val messageIdField = "message_id"
const val updateIdField = "update_id" const val updateIdField = "update_id"
@ -167,6 +170,7 @@ const val thumbHeightField = "thumb_height"
const val inputMessageContentField = "input_message_content" const val inputMessageContentField = "input_message_content"
const val hideUrlField = "hide_url" const val hideUrlField = "hide_url"
const val botCommandField = "command"
const val isMemberField = "is_member" const val isMemberField = "is_member"
const val canSendMessagesField = "can_send_messages" const val canSendMessagesField = "can_send_messages"