Clamp scale value, to prevent incorrect math
This commit is contained in:
parent
973e81c6ca
commit
41b8f0178b
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue