mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
fixes?
This commit is contained in:
parent
bac86aede3
commit
c50e49dbd4
1 changed files with 7 additions and 1 deletions
|
@ -37,7 +37,7 @@ function inject(bot, _dcclient, config, rl) {
|
||||||
bot.console.log(message.toAnsi());
|
bot.console.log(message.toAnsi());
|
||||||
});
|
});
|
||||||
|
|
||||||
rl.on('line', function(line) {
|
function handleLine(line) {
|
||||||
try {
|
try {
|
||||||
if (line.toLowerCase() === '' ||
|
if (line.toLowerCase() === '' ||
|
||||||
line.toLowerCase().startsWith(' ')) return;
|
line.toLowerCase().startsWith(' ')) return;
|
||||||
|
@ -105,6 +105,12 @@ function inject(bot, _dcclient, config, rl) {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
bot.console.error(e);
|
bot.console.error(e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rl.on('line', handleLine);
|
||||||
|
|
||||||
|
bot.once('end', () => {
|
||||||
|
rl.off('line', handleLine);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue