mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 18:54: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 = '';
|
dcmsg.queue = '';
|
||||||
consoleQueue = '';
|
consoleQueue = [];
|
||||||
|
|
||||||
bot.playersAddedPlayers = {};
|
bot.playersAddedPlayers = {};
|
||||||
bot.getplayerusername = {};
|
bot.getplayerusername = {};
|
||||||
|
@ -212,9 +212,9 @@ function main() {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
consoleQueueInterval = setInterval(function() {
|
consoleQueueInterval = setInterval(function() {
|
||||||
if (consoleQueue!='') {
|
if (consoleQueue[0] || consoleQqueue[0]==='') {
|
||||||
console.log(bot.options.host + ': ' + consoleQueue.substring(0, 10000)/* message.toAnsi() + '\u001b[0m'*/);
|
console.log(bot.options.host + ': ' + consoleQueue[0].substring(0, 10000)/* message.toAnsi() + '\u001b[0m'*/);
|
||||||
consoleQueue = '';
|
consoleQueue.shift();
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ function main() {
|
||||||
const cleanMessage = escapeMarkdown(message.toString());
|
const cleanMessage = escapeMarkdown(message.toString());
|
||||||
discordMsg = /* '_ _ ' + */cleanMessage.replaceAll('@', '@\u200B').replaceAll('http', '[http]');// .replace(/[\r\n]/gm, '\n')
|
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`);
|
// fs.appendFileSync('./logs.txt', `${bot.options.host}: ${message.toMotd()}\r\n`);
|
||||||
// if (discordMsg)return channel.send(`${discordMsg.substring(0, 2000)}`)
|
// if (discordMsg)return channel.send(`${discordMsg.substring(0, 2000)}`)
|
||||||
|
|
Loading…
Reference in a new issue