1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-23 00:57:13 +00:00

PollAnswer

This commit is contained in:
InsanusMokrassar 2020-01-23 17:17:24 +06:00
parent 41db785696
commit 4e1dbb8741
3 changed files with 18 additions and 0 deletions

View File

@ -10,6 +10,7 @@
* `SendRegularPoll` was created and represent `sendPoll` method with type `regular`
* `SendQuizPoll` was created and represent `sendPoll` method with type `quiz`
* `language` field in PreTextSource now correctly passed from telegram MessageEntities
* `PollAnswer` type was added
## 0.22.0

View File

@ -103,6 +103,7 @@ const val isAnimatedField = "is_animated"
const val inviteLinkField = "invite_link"
const val pinnedMessageField = "pinned_message"
const val customTitleField = "custom_title"
const val optionIdsField = "option_ids"
const val requestWriteAccessField = "request_write_access"
@ -177,6 +178,7 @@ const val pngStickerField = "png_sticker"
const val okField = "ok"
const val captionField = "caption"
const val idField = "id"
const val pollIdField = "poll_id"
const val textField = "text"
const val thumbField = "thumb"
const val emojiField = "emoji"

View File

@ -0,0 +1,15 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.polls
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class PollAnswer(
@SerialName(pollIdField)
val pollId: PollIdentifier,
@SerialName(userField)
val user: User,
@SerialName(optionIdsField)
val chosen: List<Int>
)