Kord-Extensions/kord-extensions

UninitializedPropertyAccessException when using group function of Paginator

doublemoon1119 opened this issue · 2 comments

Description

  • I'm using group function of Paginator.

Exception log:

2022-07-08 10:18:31.871 [DefaultDispatcher-worker-8] ERROR c.k.k.e.c.a.slash.SlashCommand - Error during execution of help slash command (dev.kord.core.event.interaction.GuildChatInputCommandInteractionCreateEvent@3b4eecef)
kotlin.UninitializedPropertyAccessException: lateinit property text has not been initialized
	at dev.kord.rest.builder.message.EmbedBuilder$Footer.getText(EmbedBuilder.kt:180)
	at com.kotlindiscord.kord.extensions.pagination.pages.Page$build$2.invokeSuspend(Page.kt:63)
	at com.kotlindiscord.kord.extensions.pagination.pages.Page$build$2.invoke(Page.kt)
	at com.kotlindiscord.kord.extensions.pagination.pages.Page$build$2.invoke(Page.kt)
	at com.kotlindiscord.kord.extensions.pagination.BasePaginator.applyPage$suspendImpl(BasePaginator.kt:109)
	at com.kotlindiscord.kord.extensions.pagination.BasePaginator.applyPage(BasePaginator.kt)
	at com.kotlindiscord.kord.extensions.pagination.PublicResponsePaginator.send(PublicResponsePaginator.kt:47)
	at me.doublemoon.kordex.extensions.HelpExtension$setup$2$1.invokeSuspend(HelpExtension.kt:48)
	at me.doublemoon.kordex.extensions.HelpExtension$setup$2$1.invoke(HelpExtension.kt)
	at me.doublemoon.kordex.extensions.HelpExtension$setup$2$1.invoke(HelpExtension.kt)
	at com.kotlindiscord.kord.extensions.commands.application.slash.PublicSlashCommand.run(PublicSlashCommand.kt:107)
	at com.kotlindiscord.kord.extensions.commands.application.slash.PublicSlashCommand$run$1.invokeSuspend(PublicSlashCommand.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Versions

  • KordEx: 1.5.4-SNAPSHOT

Suggestions

I think that's the problem

text.isNotBlank() should be changed to this.isNotBlank()

Hello, and thanks for opening an issue! As this is the first time you've created an issue on this repository, we'd just like to offer you a warm welcome to the project, and the following pointers:

  • Most importantly, all issues must adhere to our Code of Conduct. Please give it a quick read if you haven't already.

  • While our team is passionate about the projects we've created here, we're all volunteers. Please don't be offended if it takes time for us to get to your issue - we'll be here as soonas we can be!

  • Please provide as much information as possible when asking a question, reporting a problem, or submitting a feature request. This will help us to address your issue quickly and efficiently. If you forgot to add some information, no worries - feel free to edit the issue and add anything you missed!

    Thanks for contacting us! If you have any further questions, please feel free to join us on Discord in the #dev-kotdis channel (or #kordex-discussion for Kord Extensions projects), or to contact a staff member directly.

You are correct - I've just pushed a fix for this, and it'll be available in the latest snapshot shortly. Thanks!