geotim90 / Nevini

Multi-purpose Discord bot
https://nevini.de/
Apache License 2.0
4 stars 0 forks source link

Credit parser on >baro not working properly #94

Closed Yofou closed 4 years ago

Yofou commented 4 years ago

When an item is 1 million credits it should respond with 1M instead Nevini parses it as 1000k Can be replicated by doing >baro.

Screenshot - https://gyazo.com/9b9bac9ee00bec7c76a01034a7b71678

geotim90 commented 4 years ago

Not a bug, but actually the intended behaviour of the formatter in use.

Suggested enhancement (3 new test cases):

Input Current Output Expected Output
1234 1234 1234
12345 12k 12k
123456789 123m 123m
1000000 1000k 1m
1000000000 1000m 1b
1000 1000 1k

Change will be included in next patch.