This commit is contained in:
ChomeNS 2022-09-13 20:10:09 +07:00
parent 119a0daa6a
commit b86a303142

View file

@ -174,7 +174,7 @@ function main() {
};
dcmsg.queue = '';
consoleQueue = '';
consoleQueue = [];
bot.playersAddedPlayers = {};
bot.getplayerusername = {};
@ -212,9 +212,9 @@ function main() {
}, 1000);
consoleQueueInterval = setInterval(function() {
if (consoleQueue!='') {
console.log(bot.options.host + ': ' + consoleQueue.substring(0, 10000)/* message.toAnsi() + '\u001b[0m'*/);
consoleQueue = '';
if (consoleQueue[0] || consoleQqueue[0]==='') {
console.log(bot.options.host + ': ' + consoleQueue[0].substring(0, 10000)/* message.toAnsi() + '\u001b[0m'*/);
consoleQueue.shift();
}
}, 100);
@ -306,7 +306,7 @@ function main() {
const cleanMessage = escapeMarkdown(message.toString());
discordMsg = /* '_ _ ' + */cleanMessage.replaceAll('@', '@\u200B').replaceAll('http', '[http]');// .replace(/[\r\n]/gm, '\n')
consoleQueue += message.toAnsi();
consoleQueue.push(message.toAnsi());
// fs.appendFileSync('./logs.txt', `${bot.options.host}: ${message.toMotd()}\r\n`);
// if (discordMsg)return channel.send(`${discordMsg.substring(0, 2000)}`)