mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-11-29 21:55:38 -05:00
Update commands/evaljsvm2.js
This commit is contained in:
@@ -33,7 +33,7 @@ trustLevel: 1,
|
||||
case 'run':
|
||||
try {
|
||||
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('§', '&'))
|
||||
}else
|
||||
source.sendFeedback([cmd, { text: util.inspect(output, { stylize }) }])
|
||||
@@ -47,14 +47,14 @@ if (!bot.options.Core.CorelessMode){
|
||||
break
|
||||
case 'reset':
|
||||
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('§', '&'))
|
||||
}else{
|
||||
source.sendFeedback([cmd, { text: 'Successfully reset the eval context', color: 'green' }])
|
||||
}
|
||||
break
|
||||
default:
|
||||
if(!bot.options.Core.CorelessMode){
|
||||
if(bot.options.Core.CorelessMode){
|
||||
bot.chat(ChatMessage.fromNotch([cmd, { text: 'Invalid option!', color: 'dark_red' }]).toMotd().replaceAll('§', '&'))
|
||||
}else{
|
||||
source.sendFeedback([cmd, { text: 'Invalid option!', color: 'dark_red' }])
|
||||
|
||||
Reference in New Issue
Block a user