mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 01:25:33 -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());
|
||||
});
|
||||
|
||||
rl.on('line', function(line) {
|
||||
function handleLine(line) {
|
||||
try {
|
||||
if (line.toLowerCase() === '' ||
|
||||
line.toLowerCase().startsWith(' ')) return;
|
||||
|
@ -105,6 +105,12 @@ function inject(bot, _dcclient, config, rl) {
|
|||
} catch (e) {
|
||||
bot.console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
rl.on('line', handleLine);
|
||||
|
||||
bot.once('end', () => {
|
||||
rl.off('line', handleLine);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue