mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
add raw fields for CallbackQuery
This commit is contained in:
parent
1c9ca7a493
commit
953638ddf5
@ -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
|
Loading…
Reference in New Issue
Block a user