mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
fix csvr
This commit is contained in:
parent
aef414fd3b
commit
01de4103f0
1 changed files with 8 additions and 6 deletions
|
@ -57,6 +57,14 @@ function inject(bot, dcclient, config, rl) {
|
|||
if (line.toLowerCase() === '' ||
|
||||
line.toLowerCase().startsWith(' ')) return;
|
||||
|
||||
if (line.startsWith('.csvr ')) {
|
||||
const host = line.substring(6);
|
||||
const bots = bot.getBots();
|
||||
bots.forEach((bot) => bot.console.host = host);
|
||||
bot.console.info(`Host set to: ${host}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bot.options.host !== bot.console.host && bot.console.host !== 'all') return;
|
||||
if (line.toLowerCase() === '.exit' || line.toLowerCase() === '.end') {
|
||||
bot.emit('end', 'end command');
|
||||
|
@ -89,12 +97,6 @@ function inject(bot, dcclient, config, rl) {
|
|||
return;
|
||||
}
|
||||
if (line === '.kill') process.exit();
|
||||
if (line.startsWith('.csvr ')) {
|
||||
const host = line.substring(6);
|
||||
bot.console.host = host;
|
||||
bot.console.info(`Host set to: ${host}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (line.startsWith('.')) {
|
||||
return bot.command_handler.run(
|
||||
|
|
Loading…
Reference in a new issue