2020-10-04 11:06:30 +00:00
|
|
|
package dev.inmo.tgbotapi.requests
|
2019-04-16 08:45:20 +00:00
|
|
|
|
2022-05-01 16:13:40 +00:00
|
|
|
import dev.inmo.tgbotapi.abstracts.types.MessageAction
|
2022-08-05 05:47:39 +00:00
|
|
|
import dev.inmo.tgbotapi.abstracts.types.WithReplyMarkup
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
|
|
|
import dev.inmo.tgbotapi.types.*
|
|
|
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
|
|
|
import dev.inmo.tgbotapi.types.polls.Poll
|
2021-05-29 09:34:14 +00:00
|
|
|
import dev.inmo.tgbotapi.types.polls.PollSerializer
|
2019-04-16 08:45:20 +00:00
|
|
|
import kotlinx.serialization.*
|
|
|
|
|
|
|
|
@Serializable
|
|
|
|
data class StopPoll(
|
|
|
|
@SerialName(chatIdField)
|
|
|
|
override val chatId: ChatIdentifier,
|
|
|
|
@SerialName(messageIdField)
|
|
|
|
override val messageId: MessageIdentifier,
|
|
|
|
@SerialName(replyMarkupField)
|
2019-05-10 11:17:47 +00:00
|
|
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
2022-08-05 05:47:39 +00:00
|
|
|
) : MessageAction, SimpleRequest<Poll>, WithReplyMarkup {
|
2019-04-16 08:45:20 +00:00
|
|
|
override fun method(): String = "stopPoll"
|
2019-12-02 08:35:37 +00:00
|
|
|
override val resultDeserializer: DeserializationStrategy<Poll>
|
2021-05-29 09:34:14 +00:00
|
|
|
get() = PollSerializer
|
2019-12-02 08:35:37 +00:00
|
|
|
override val requestSerializer: SerializationStrategy<*>
|
|
|
|
get() = serializer()
|
2019-04-16 08:45:20 +00:00
|
|
|
}
|