From f13b7c217a3fb773df9176e7788e9be31c3c3ea2 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 17 Feb 2021 22:27:20 +0600 Subject: [PATCH] klassindex for dice animation type --- tgbotapi.core/build.gradle | 3 ++- tgbotapi.core/src/jvmTest/kotlin/Temporal.kt | 21 ++------------------ 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/tgbotapi.core/build.gradle b/tgbotapi.core/build.gradle index b598e83f2a..fc27ae6efa 100644 --- a/tgbotapi.core/build.gradle +++ b/tgbotapi.core/build.gradle @@ -108,7 +108,8 @@ kapt { arguments { arg( "com.github.matfax.klassindex.IndexSubclasses", - "dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValue", + "dev.inmo.tgbotapi.types.dice.DiceAnimationType", +// "dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValue", // "dev.inmo.tgbotapi.types.message.content.abstracts.ResendableContent", // "dev.inmo.tgbotapi.types.message.abstracts.Message", // "dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.EncryptedPassportElement", diff --git a/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt b/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt index 8bbe724a49..2592673efe 100644 --- a/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt +++ b/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt @@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.types.actions.BotAction import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.abstracts.Chat +import dev.inmo.tgbotapi.types.dice.DiceAnimationType import dev.inmo.tgbotapi.types.files.abstracts.TelegramMediaFile import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.content.abstracts.ResendableContent @@ -40,25 +41,7 @@ val result = mutableMapOf, Set>>() fun main() { - result[SecureValue::class] = setOf(dev.inmo.tgbotapi.types.passport.decrypted.AddressSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.BankStatementSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.CommonPassportSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.DriverLicenseSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.IdentityCardSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.IdentityWithReverseSideSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.InternalPassportSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.OtherDocumentsSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.PassportRegistrationSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.PassportSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.PersonalDetailsSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.RentalAgreementSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.TemporalRegistrationSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.UtilityBillSecureValue::class, - dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueIdentity::class, - dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData::class, - dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithFiles::class, - dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithReverseSide::class, - dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithTranslations::class) + result[DiceAnimationType::class] = KlassIndex.getSubclasses(DiceAnimationType::class).toSet() println("import dev.inmo.tgbotapi.utils.PreviewFeature") val importsToFuns = result.keys.flatMap { println("import ${it.qualifiedName}")