Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultingBoolean looking weird on the help command #83

Open
Unicorn7141 opened this issue Sep 20, 2021 · 3 comments
Open

defaultingBoolean looking weird on the help command #83

Unicorn7141 opened this issue Sep 20, 2021 · 3 comments
Assignees
Labels
Type: Question Request for clarification or more information.

Comments

@Unicorn7141
Copy link

Description

I was trying to make a shop command which allows people to add an item and decide whether it's limited to quantity X or not, using a defaultingBoolean with a default false.
When I checked the command using help it showed the following: [limited?: yes/no=false] which could be quite confusing.

Versions

KordEx version: 1.5.0-SNAPSHOT

Reproduction

Code Examples

class Test : Arguments() {
    val bool by defaultingBoolean("bool", "The boolean to print", defaultValue = false)
}

Suggestions

Change the help command to show "yes" or "no" according to true or false

Media

Click to expans

image

@boring-cyborg
Copy link

boring-cyborg bot commented Sep 20, 2021

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.

@gdude2002 gdude2002 added the Type: Bug Something isn't working correctly. label Sep 22, 2021
@gdude2002 gdude2002 self-assigned this Sep 22, 2021
@gdude2002 gdude2002 added Type: Question Request for clarification or more information. and removed Type: Bug Something isn't working correctly. labels Sep 22, 2021
@gdude2002
Copy link
Member

Having looked into this, defaulting converters will show the precise value you've provided as the default value there. I'm not sure special-casing Boolean converters for this is the way to go, maybe some kind of translation method? I'm really not sure - I'll have to think about it.

@gdude2002
Copy link
Member

So far, I haven't been able to come up with a smart solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Request for clarification or more information.
Projects
None yet
Development

No branches or pull requests

2 participants