aoijs / aoi.js

aoi.js - The most advanced string-based package to create a Discord Bot fast and powerful.
https://aoi.js.org
Apache License 2.0
329 stars 130 forks source link

Bug: $roundTenth #617

Closed lawerth closed 2 months ago

lawerth commented 2 months ago

Bug Type

Function

Bugged Function

$roundTenth[503.6972]

Version of aoi.js

v6.7.1

Version of Node.js

v21.4.0 (Current)

Excepted Output

Expected output: "503.70" Error: AoiError: Invalid Decimal Position Provided In [503.6972] Version: 6.8.0

Relevant log output

No response

Code of Conduct

USERSATOSHI commented 2 months ago

@lawerth hi , you need to provide the round off decimal in roundTenth function so a proper usage might be

$roundTenth[503.6972;2] // 503.70

lawerth commented 2 months ago

@USERSATOSHI I understand I looked at aoi.js docs. It was used incorrectly in the example there. It would be nice if you fix it.

AstrooKai commented 2 months ago

@USERSATOSHI I understand I looked at aoi.js docs. It was used incorrectly in the example there. It would be nice if you fix it.

Thanks for letting us know, @lawerth! We've updated the documentation to reflect the correct usage. We apologize for any inconvenience.

Fixed with #180