Update modules/command_manager.js

This commit is contained in:
4Parker02991 2024-01-27 09:41:56 -05:00
parent eedc5fece2
commit a581447b10

View file

@ -127,7 +127,7 @@ async function command_manager(bot, options) {
command.trustLevel === 2 && command.trustLevel === 2 &&
owner !== bot.owner owner !== bot.owner
) )
if (!bot.options.Core.CorelessMode){ if (bot.options.Core.CorelessMode){
throw new CommandError('&4Invalid Owner Hash') throw new CommandError('&4Invalid Owner Hash')
}else{ }else{
@ -137,7 +137,7 @@ async function command_manager(bot, options) {
}); });
} }
if (command.trustLevel === 3 && !source?.sources?.console) if (command.trustLevel === 3 && !source?.sources?.console)
if(!bot.options.Core.CorelessMode){ if(bot.options.Core.CorelessMode){
throw new CommandError('&9This command can only be execute via console') throw new CommandError('&9This command can only be execute via console')
}else{ }else{
throw new CommandError({ throw new CommandError({
@ -153,7 +153,7 @@ async function command_manager(bot, options) {
}); });
bot.console.warn(error.stack); bot.console.warn(error.stack);
if (!bot.options.Core.CorelessMode){ if (bot.options.Core.CorelessMode){
if (error instanceof CommandError) if (error instanceof CommandError)
bot.chat(error._message) bot.chat(error._message)
else bot.chat('a error has occured!') else bot.chat('a error has occured!')