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

[Bug Report] CommandOption minValue and maxValue use incorrect types #312

Open
3 tasks done
Canary-Prism opened this issue Dec 28, 2024 · 1 comment
Open
3 tasks done
Assignees
Labels
status: pending Awaiting response from a discord.jv dev type: bug Issue or PR is a bug that should be fixed

Comments

@Canary-Prism
Copy link

Canary-Prism commented Dec 28, 2024

General Troubleshooting

  • You've have checked for similar issues.
  • You've updated to the latest version of the API
  • You've have checked the PR's for bug fixes relating to your issue.

Part of library impacted

com.seailz.discordjar.command.CommandOption record

Bug Report Description

the CommandOption record uses ints for the minValue and maxValue fields, even though the api actually uses potentially decimals of range -2^53 to 2^53 for those values, this means the record is unable to accurately represent the value for options obtained from the discord api.

additionally the constructor compile method and decompile method trap value -1 and 0 to represent the lack of min or max values, even though the api allows those values

Steps to reproduce

  1. request a command from the api and get the option data or make one manually
@Canary-Prism Canary-Prism added status: pending Awaiting response from a discord.jv dev type: bug Issue or PR is a bug that should be fixed labels Dec 28, 2024
@seailz
Copy link
Member

seailz commented Jan 18, 2025

Thank you! Investigating now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending Awaiting response from a discord.jv dev type: bug Issue or PR is a bug that should be fixed
Projects
None yet
Development

No branches or pull requests

2 participants