This commit is contained in:
ChomeNS 2022-11-14 18:53:52 +07:00
parent aef414fd3b
commit 01de4103f0

View file

@ -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(