diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCasts.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCasts.kt index 999f165c15..21fc99db2e 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCasts.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCasts.kt @@ -513,6 +513,10 @@ inline fun Message.asPossiblySentViaBotCommonMessage(): PossiblySentViaBotCommon @PreviewFeature inline fun Message.requirePossiblySentViaBotCommonMessage(): PossiblySentViaBotCommonMessage = this as PossiblySentViaBotCommonMessage @PreviewFeature +inline fun Message.asFromUserMessage(): FromUserMessage? = this as? FromUserMessage +@PreviewFeature +inline fun Message.requireFromUserMessage(): FromUserMessage = this as FromUserMessage +@PreviewFeature inline fun BotAction.asFindLocationAction(): FindLocationAction? = this as? FindLocationAction @PreviewFeature inline fun BotAction.requireFindLocationAction(): FindLocationAction = this as FindLocationAction