Kord-Extensions/kord-extensions

paginator gives wrong error message when no pages are added

mooziii opened this issue · 2 comments

Description

Whenever I try to create a paginator without a page I get an exception saying No such group: tags but it should be `Empty paginators aren't allowed' or something similar

What were you doing when you first noticed the problem?

➜ I tried to send a paginator as command interaction response without any page in it

How does the problem affect your use-case?

➜ It gave me the wrong error

Versions

Dependencies

    implementation("com.sedmelluq:lavaplayer:1.3.78")
    implementation("dev.kord:kord-core:0.8.0-M15") {
        capabilities {
            requireCapability("dev.kord:core-voice:0.8.0-M14")
        }
    }
    implementation("com.kotlindiscord.kord.extensions:kord-extensions:1.5.5-SNAPSHOT") {
        exclude("dev.kord")
    }
    implementation("com.kotlindiscord.kord.extensions:unsafe:1.5.5-SNAPSHOT")
    implementation("com.kotlindiscord.kord.extensions:extra-mappings:1.5.5-SNAPSHOT")

Editor name and version

➜ IntelliJ IDEA Ultimate 2022.1.4

Gradle version

➜ Gradle 7.4.2

JDK distribution, version and architecture

➜ OpenJDK Temurin-17+35 (build17+35)

Kotlin distribution and plugin version

➜ Kotlin JVM 1.7.10

Code Examples

image
This code doesn't add a page because pagesNeeded is zero

This gives me the error No such group: tags although it should be something other

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.

This has been fixed in 1d683d2 - please note that I've also pushed a dependency on the Kord Voice capability in f78b64d, so you should remove your explicit dependency on Kord (and the voice capability) entirely.