diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCasts.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCasts.kt index a0e7317dc1..d033cd6421 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCasts.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCasts.kt @@ -926,15 +926,16 @@ inline fun Message.requireChannelContentMessageImpl(): UnconnectedFromChannelGro this as UnconnectedFromChannelGroupContentMessageImpl @PreviewFeature -inline fun Message.whenFromChannelGroupContentMessageImpl(block: (FromChannelGroupContentMessageImpl) -> T) = asFromChannelGroupContentMessageImpl() ?.let(block) +@Deprecated("Renamed", ReplaceWith("whenConnectedFromChannelGroupContentMessage", "dev.inmo.tgbotapi.extensions.utils.whenConnectedFromChannelGroupContentMessage")) +inline fun Message.whenFromChannelGroupContentMessageImpl(block: (ConnectedFromChannelGroupContentMessage) -> T) = whenConnectedFromChannelGroupContentMessage(block) @PreviewFeature -inline fun Message.asFromChannelGroupContentMessageImpl(): FromChannelGroupContentMessageImpl? = - this as? FromChannelGroupContentMessageImpl +@Deprecated("Renamed", ReplaceWith("asConnectedFromChannelGroupContentMessage", "dev.inmo.tgbotapi.extensions.utils.asConnectedFromChannelGroupContentMessage")) +inline fun Message.asFromChannelGroupContentMessageImpl(): ConnectedFromChannelGroupContentMessage? = asConnectedFromChannelGroupContentMessage() @PreviewFeature -inline fun Message.requireFromChannelGroupContentMessageImpl(): FromChannelGroupContentMessageImpl = - this as FromChannelGroupContentMessageImpl +@Deprecated("Renamed", ReplaceWith("requireConnectedFromChannelGroupContentMessage", "dev.inmo.tgbotapi.extensions.utils.requireConnectedFromChannelGroupContentMessage")) +inline fun Message.requireFromChannelGroupContentMessageImpl(): ConnectedFromChannelGroupContentMessage = requireConnectedFromChannelGroupContentMessage() @PreviewFeature inline fun Message.whenPassportMessage(block: (PassportMessage) -> T) = asPassportMessage() ?.let(block) @@ -1038,7 +1039,7 @@ inline fun Message.whenConnectedFromChannelGroupContentMessage(block: (Conne @PreviewFeature inline fun Message.asConnectedFromChannelGroupContentMessage(): ConnectedFromChannelGroupContentMessage? = - this as? ConnectedFromChannelGroupContentMessageImpl + this as? ConnectedFromChannelGroupContentMessage @PreviewFeature inline fun Message.requireConnectedFromChannelGroupContentMessage(): ConnectedFromChannelGroupContentMessage =