Clamp scale value, to prevent incorrect math

This commit is contained in:
7cc5c4f330d47060 2025-02-11 19:20:47 -05:00
parent 973e81c6ca
commit 41b8f0178b
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA

View file

@ -5,7 +5,7 @@ import { getMessage } from '../util/lang.js'
*/
const execute = (c) => {
if(c.args[0] == "set"){
const scale = +c.args[1]
const scale = Math.min(Math.max(+c.args[1],0.0625),16)
c.reply({
translate: getMessage(c.lang, 'command.scale.set'),
color: c.colors.secondary,