mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
sendDice in extensions api
This commit is contained in:
parent
c3fca5c6c4
commit
8ef7acab2d
@ -31,6 +31,8 @@
|
|||||||
* 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)
|
||||||
|
* `TelegramBotAPI-extensions-api`:
|
||||||
|
* Extensions `sendDice` was added
|
||||||
|
|
||||||
### 0.25.1
|
### 0.25.1
|
||||||
|
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
|
||||||
|
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendDice
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||||
|
|
||||||
|
suspend fun RequestsExecutor.sendDice(
|
||||||
|
chatId: ChatIdentifier,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
replyMarkup: KeyboardMarkup? = null
|
||||||
|
) = execute(
|
||||||
|
SendDice(chatId, disableNotification, replyToMessageId, replyMarkup)
|
||||||
|
)
|
||||||
|
|
||||||
|
suspend fun RequestsExecutor.sendDice(
|
||||||
|
chat: Chat,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
replyMarkup: KeyboardMarkup? = null
|
||||||
|
) = sendDice(chat.id, disableNotification, replyToMessageId, replyMarkup)
|
Loading…
Reference in New Issue
Block a user