diff --git a/plugins/console.js b/plugins/console.js index 7a778fe..f1e4b0e 100644 --- a/plugins/console.js +++ b/plugins/console.js @@ -43,6 +43,7 @@ function inject(bot, _dcclient, config, rl) { bot.once('end', () => { clearInterval(consoleQueueInterval); + rl.close(); rl.removeAllListeners(); }); @@ -60,8 +61,7 @@ function inject(bot, _dcclient, config, rl) { if (line.startsWith('.csvr ')) { const host = line.substring(6); - const bots = bot.getBots(); - bots.forEach((bot) => bot.console.host = host); + bot.getBots().forEach((bot) => bot.console.host = host); bot.console.info(`Host set to: ${host}`); return; }