mirror of
				https://github.com/InsanusMokrassar/TelegramBotAPI.git
				synced 2025-10-25 09:10:07 +00:00 
			
		
		
		
	BotCommand
This commit is contained in:
		| @@ -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 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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 | ||||||
|  | ) | ||||||
| @@ -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" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user