mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-01 23:45:25 +00:00
25 lines
1.0 KiB
Kotlin
25 lines
1.0 KiB
Kotlin
|
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)
|