Pizzacus / SataniaBot

The most devilish bot for Discord!
MIT License
22 stars 6 forks source link

Rewrite the 'convert' command #3

Closed lunakurame closed 6 years ago

lunakurame commented 6 years ago

I rewrote the whole convert.js file for you since it had "TODO rewrite me ;_;". Everything should work the same (so eg. it still doesn't parse s!convert 5'8), the only changes, besides refactoring, are some typos in the "There was an error processing your mesurements" message and I also changed how commas in numbers are interpreted. Originally they were all just replaced with periods, now if there is a single comma and no period, it's still being replaced with a period (do eg. 42,1 works like 42.1), but if there are multiple commas or a comma and a period, then commas will just be removed (so 1,000.00 is now 1000.00).

Pizzacus commented 6 years ago

Yeah, that looks quite good and passes the linter, so it can be merged, thanks a lot! This command needed to be rewritten for a while, so here, you get lots of kisses and hugs ♥