mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2025-03-13 22:09:47 -04:00
remove bot. and remove unused hash function
This commit is contained in:
parent
71d7c51bd2
commit
f4dc1fea16
1 changed files with 4 additions and 10 deletions
14
index.js
14
index.js
|
@ -174,18 +174,12 @@ function main() {
|
|||
dcmsg.queue = '';
|
||||
consoleQueue = [];
|
||||
|
||||
bot.messageLoggingEnabled = true;
|
||||
messageloggingEnabled = true;
|
||||
|
||||
bot.playersAddedPlayers = {};
|
||||
bot.getplayerusername = {};
|
||||
|
||||
bot.hash = '';
|
||||
bot.setHash = function(hash) {
|
||||
bot.hash = hash;
|
||||
};
|
||||
bot.setOwnerHash = function(hash) {
|
||||
bot.ownerhash = hash;
|
||||
};
|
||||
|
||||
sleep = (time) => new Promise((a)=>setTimeout(a, time)),
|
||||
bot.chat = (message) => {
|
||||
|
@ -212,7 +206,7 @@ function main() {
|
|||
}, 1500);
|
||||
|
||||
consoleQueueInterval = setInterval(function() {
|
||||
if (!bot.messageLoggingEnabled) return;
|
||||
if (!messageloggingEnabled) return;
|
||||
if (consoleQueue.length > 50) consoleQueue = [];
|
||||
if (consoleQueue[0] || consoleQueue[0]==='') {
|
||||
console.log(bot.options.host + ': ' + consoleQueue[0].substring(0, 10000)/* message.toAnsi() + '\u001b[0m'*/);
|
||||
|
@ -461,11 +455,11 @@ dcclient.on('ready', async () => {
|
|||
return;
|
||||
}
|
||||
if (line==='.messagelogging on') {
|
||||
bot.messageLoggingEnabled = true;
|
||||
messageloggingEnabled = true;
|
||||
return;
|
||||
}
|
||||
if (line==='.messagelogging off') {
|
||||
bot.messageLoggingEnabled = false;
|
||||
messageloggingEnabled = false;
|
||||
return;
|
||||
}
|
||||
if (line==='.kill') process.exit();
|
||||
|
|
Loading…
Reference in a new issue