From b0d8abf6df824ef446486fa515d7777ae14173a6 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 29 Aug 2024 18:52:27 +0600 Subject: [PATCH] one more dump --- tgbotapi.utils/api/tgbotapi.utils.api | 3 +++ .../inmo/tgbotapi/extensions/utils/ClassCastsNew.kt | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/tgbotapi.utils/api/tgbotapi.utils.api b/tgbotapi.utils/api/tgbotapi.utils.api index 586543629b..8890c404aa 100644 --- a/tgbotapi.utils/api/tgbotapi.utils.api +++ b/tgbotapi.utils/api/tgbotapi.utils.api @@ -1865,6 +1865,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun ifReplyKeyboardMarkup (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifReplyKeyboardRemove (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifRestrictedChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public static final fun ifRestrictedMemberChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifSecondaryChatInviteLink (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifSecureValueIdentity (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifSecureValueWithData (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; @@ -2379,6 +2380,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun replyKeyboardRemoveOrThrow (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/types/buttons/ReplyKeyboardRemove; public static final fun restrictedChatMemberOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedChatMember; public static final fun restrictedChatMemberOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedChatMember; + public static final fun restrictedMemberChatMemberOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedMemberChatMember; + public static final fun restrictedMemberChatMemberOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedMemberChatMember; public static final fun secondaryChatInviteLinkOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/SecondaryChatInviteLink; public static final fun secondaryChatInviteLinkOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/SecondaryChatInviteLink; public static final fun secureValueIdentityOrNull (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValueIdentity; diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt index fd0516c334..ac26192758 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt @@ -168,6 +168,7 @@ import dev.inmo.tgbotapi.types.chat.member.LeftChatMember import dev.inmo.tgbotapi.types.chat.member.MemberChatMember import dev.inmo.tgbotapi.types.chat.member.OwnerChatMember import dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember +import dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember import dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember import dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember import dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType @@ -753,6 +754,16 @@ public inline fun OptionallyWithUser.restrictedChatMemberOrThrow(): RestrictedCh public inline fun OptionallyWithUser.ifRestrictedChatMember(block: (RestrictedChatMember) -> T): T? = restrictedChatMemberOrNull() ?.let(block) +public inline fun OptionallyWithUser.restrictedMemberChatMemberOrNull(): RestrictedMemberChatMember? + = this as? dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember + +public inline fun OptionallyWithUser.restrictedMemberChatMemberOrThrow(): RestrictedMemberChatMember + = this as dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember + +public inline fun + OptionallyWithUser.ifRestrictedMemberChatMember(block: (RestrictedMemberChatMember) -> T): T? = + restrictedMemberChatMemberOrNull() ?.let(block) + public inline fun OptionallyWithUser.specialRightsChatMemberOrNull(): SpecialRightsChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember