esmBot / esmBot

A free and open-source Discord bot designed to entertain your server
https://esmbot.net
MIT License
383 stars 113 forks source link

&speed doesnt get affected by decimals #248

Open studded1 opened 2 years ago

studded1 commented 2 years ago

Describe the bug

for example: &speed 1 and &speed 1.9 will do the same thing. but doing &speed 2 will speed it up. i did this on the dev version so i dont know if it happens in the main bot.

Steps to reproduce

step 1. literally just follow the instructions at the top

Expected behavior

the speed will not change

Screenshots

https://user-images.githubusercontent.com/101254176/157420134-83279c8a-ecb7-436b-a2d7-c524ca79463b.mp4

Self-hosted instance?

No

Additional context

No response

bjcscat commented 2 years ago

This can probably be fixed from using a float in the speed.cc.

bjcscat commented 2 years ago

I've looked into it and I don't think that this would be possible. I might be wrong though, someone with more knowledge about this please look into it.

TheEssem commented 2 years ago

The speed parameter is stored as an int on the native side, so any decimal values are rounded to the largest integer less than that value.