commonMain.com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendDice.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of TelegramBotAPI-js Show documentation
Show all versions of TelegramBotAPI-js Show documentation
Library for Object-Oriented and type-safe work with Telegram Bot API
package com.github.insanusmokrassar.TelegramBotAPI.requests.send
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableNotification
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMessageId
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.ReplyingMarkupSendMessageRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.DiceContent
import kotlinx.serialization.*
internal val DiceContentMessageResultDeserializer: DeserializationStrategy>
= TelegramBotAPIMessageDeserializationStrategyClass()
@Serializable
data class SendDice(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : ReplyingMarkupSendMessageRequest>, ReplyMessageId, DisableNotification {
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
override fun method(): String = "sendDice"
override val resultDeserializer: DeserializationStrategy>
get() = DiceContentMessageResultDeserializer
}