mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-29 04:47:48 +00:00
33 lines
1.4 KiB
Kotlin
33 lines
1.4 KiB
Kotlin
|
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.games
|
||
|
|
||
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ReplyMarkup
|
||
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.ReplyingMarkupSendMessageRequest
|
||
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.SendMessageRequest
|
||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
|
||
|
import kotlinx.serialization.KSerializer
|
||
|
import kotlinx.serialization.Optional
|
||
|
import kotlinx.serialization.SerialName
|
||
|
import kotlinx.serialization.Serializable
|
||
|
|
||
|
@Serializable
|
||
|
data class SendGame (
|
||
|
@SerialName(chatIdField)
|
||
|
override val chatId: ChatIdentifier,
|
||
|
@SerialName(gameShortNameField)
|
||
|
val gameShortName: String,
|
||
|
@SerialName(disableNotificationField)
|
||
|
@Optional
|
||
|
override val disableNotification: Boolean = false,
|
||
|
@SerialName(replyToMessageIdField)
|
||
|
@Optional
|
||
|
override val replyToMessageId: MessageIdentifier? = null,
|
||
|
@SerialName(replyMarkupField)
|
||
|
@Optional
|
||
|
override val replyMarkup: KeyboardMarkup? = null
|
||
|
) : SendMessageRequest<RawMessage>,
|
||
|
ReplyMarkup {
|
||
|
override fun method(): String = "sendGame"
|
||
|
override fun resultSerializer(): KSerializer<RawMessage> = RawMessage.serializer()
|
||
|
}
|