update classcasts

This commit is contained in:
InsanusMokrassar 2021-04-16 22:00:45 +06:00
parent 5451adf4ac
commit 2dc8beba8a
1 changed files with 4 additions and 0 deletions

View File

@ -513,6 +513,10 @@ inline fun Message.asPossiblySentViaBotCommonMessage(): PossiblySentViaBotCommon
@PreviewFeature
inline fun Message.requirePossiblySentViaBotCommonMessage(): PossiblySentViaBotCommonMessage<MessageContent> = this as PossiblySentViaBotCommonMessage<MessageContent>
@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