Update commands/evaljsvm2.js
This commit is contained in:
parent
3c6477223a
commit
5b64fcba89
1 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ trustLevel: 1,
|
||||||
case 'run':
|
case 'run':
|
||||||
try {
|
try {
|
||||||
const output = vm.run(args.slice(2).join(' '))
|
const output = vm.run(args.slice(2).join(' '))
|
||||||
if (!bot.options.Core.CorelessMode){
|
if (bot.options.Core.CorelessMode){
|
||||||
bot.chat(ChatMessage.fromNotch([cmd, { text: util.inspect(output, { stylize }) }]).toMotd().replaceAll('§', '&'))
|
bot.chat(ChatMessage.fromNotch([cmd, { text: util.inspect(output, { stylize }) }]).toMotd().replaceAll('§', '&'))
|
||||||
}else
|
}else
|
||||||
source.sendFeedback([cmd, { text: util.inspect(output, { stylize }) }])
|
source.sendFeedback([cmd, { text: util.inspect(output, { stylize }) }])
|
||||||
|
@ -47,14 +47,14 @@ if (!bot.options.Core.CorelessMode){
|
||||||
break
|
break
|
||||||
case 'reset':
|
case 'reset':
|
||||||
vm = new VM(options)
|
vm = new VM(options)
|
||||||
if(!bot.options.Core.CorelessMode){
|
if(bot.options.Core.CorelessMode){
|
||||||
bot.chat(ChatMessage.fromNotch([cmd, { text: 'Successfully reset the eval context', color: 'green' }]).toMotd().replaceAll('§', '&'))
|
bot.chat(ChatMessage.fromNotch([cmd, { text: 'Successfully reset the eval context', color: 'green' }]).toMotd().replaceAll('§', '&'))
|
||||||
}else{
|
}else{
|
||||||
source.sendFeedback([cmd, { text: 'Successfully reset the eval context', color: 'green' }])
|
source.sendFeedback([cmd, { text: 'Successfully reset the eval context', color: 'green' }])
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
if(!bot.options.Core.CorelessMode){
|
if(bot.options.Core.CorelessMode){
|
||||||
bot.chat(ChatMessage.fromNotch([cmd, { text: 'Invalid option!', color: 'dark_red' }]).toMotd().replaceAll('§', '&'))
|
bot.chat(ChatMessage.fromNotch([cmd, { text: 'Invalid option!', color: 'dark_red' }]).toMotd().replaceAll('§', '&'))
|
||||||
}else{
|
}else{
|
||||||
source.sendFeedback([cmd, { text: 'Invalid option!', color: 'dark_red' }])
|
source.sendFeedback([cmd, { text: 'Invalid option!', color: 'dark_red' }])
|
||||||
|
|
Loading…
Reference in a new issue