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

add raw fields for CallbackQuery

This commit is contained in:
InsanusMokrassar 2022-01-06 16:57:51 +06:00
parent 1c9ca7a493
commit 953638ddf5

View File

@ -0,0 +1,23 @@
package dev.inmo.tgbotapi.extensions.utils.extensions.raw
import dev.inmo.tgbotapi.extensions.utils.*
import dev.inmo.tgbotapi.types.CallbackQuery.CallbackQuery
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
import dev.inmo.tgbotapi.types.User
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.utils.RiskFeature
@RiskFeature(RawFieldsUsageWarning)
val CallbackQuery.message: ContentMessage<MessageContent>?
get() = asMessageCallbackQuery() ?.message
@RiskFeature(RawFieldsUsageWarning)
val CallbackQuery.inline_message_id: InlineMessageIdentifier?
get() = asInlineMessageIdCallbackQuery() ?.inlineMessageId
@RiskFeature(RawFieldsUsageWarning)
val CallbackQuery.data: String?
get() = asDataCallbackQuery() ?.data
@RiskFeature(RawFieldsUsageWarning)
val CallbackQuery.game_short_name: String?
get() = asGameShortNameCallbackQuery() ?.gameShortName