mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
array
This commit is contained in:
parent
119a0daa6a
commit
b86a303142
1 changed files with 5 additions and 5 deletions
10
index.js
10
index.js
|
@ -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)}`)
|
||||
|
|
Loading…
Reference in a new issue