mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-27 12:38:45 +00:00
update for FromUserMessage : Message
This commit is contained in:
parent
aed93a4c91
commit
3932dc622b
@ -109,11 +109,11 @@ kapt {
|
||||
arguments {
|
||||
arg(
|
||||
"com.github.matfax.klassindex.IndexSubclasses",
|
||||
"dev.inmo.tgbotapi.types.update.abstracts.Update",
|
||||
"dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChatEvent",
|
||||
// "dev.inmo.tgbotapi.types.update.abstracts.Update",
|
||||
// "dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChatEvent",
|
||||
// "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.message.abstracts.Message",
|
||||
// "dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.EncryptedPassportElement",
|
||||
// "dev.inmo.tgbotapi.types.passport.PassportElementError",
|
||||
// "dev.inmo.tgbotapi.types.CallbackQuery.CallbackQuery",
|
||||
|
@ -30,7 +30,6 @@ private val baseSerializers: Map<String, KSerializer<out TextSource>> = mapOf(
|
||||
"cashtag" to CashTagTextSource.serializer(),
|
||||
)
|
||||
|
||||
@Serializer(TextSource::class)
|
||||
object TextSourceSerializer : TypedSerializer<TextSource>(TextSource::class, baseSerializers) {
|
||||
override fun <T: TextSource> include(type: String, serializer: KSerializer<T>) {
|
||||
require(type !in baseSerializers.keys)
|
||||
|
@ -42,8 +42,7 @@ val result = mutableMapOf<KClass<*>, Set<KClass<*>>>()
|
||||
|
||||
|
||||
fun main() {
|
||||
result[Update::class] = KlassIndex.getSubclasses(Update::class).toSet()
|
||||
result[ChatEvent::class] = KlassIndex.getSubclasses(ChatEvent::class).toSet()
|
||||
result[Message::class] = KlassIndex.getSubclasses(Message::class).toSet()
|
||||
println("import dev.inmo.tgbotapi.utils.PreviewFeature")
|
||||
val importsToFuns = result.keys.flatMap {
|
||||
println("import ${it.qualifiedName}")
|
||||
|
Loading…
Reference in New Issue
Block a user