mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
fix cloop error with interval 0
This commit is contained in:
parent
f4dc1fea16
commit
32bbbb08d5
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ module.exports = {
|
|||
if (args[1]==='add') {
|
||||
if (args[0]===bot.hash) {
|
||||
if (args[3]) {
|
||||
if (!Number(args[2])) throw new SyntaxError('Invalid interval');
|
||||
if (!Number(args[2]) && Number(args[2]) !== 0) throw new SyntaxError('Invalid interval');
|
||||
add(args.slice(3).join(' '), args[2], bot);
|
||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify([{text: 'Added command ', color: 'white'}, {text: `${args.slice(3).join(' ')}`, color: 'aqua'}, {text: ' with interval ', color: 'white'}, {text: `${args[2]}`, color: 'green'}, {text: ' to the cloops', color: 'white'}]));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue