$(eval) To Divide User Input

Asked Jul 14, 2020·2 replies·Last activity 6 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I'm trying to make a command that uses $(eval) to divide the input from a user by a constant number, but cannot work out how to do it.

2 replies

Example to divide by 2

$(eval parseFloat(decodeURIComponent(`$(querystring)`))/2||`Bad input!`)

Thanks for the help I appreciate the timeliness of it. (I honestly should've waited as one of the mods I work with created the command that I needed)