remove bot. and remove unused hash function

This commit is contained in:
ChomeNS 2022-10-23 20:14:34 +07:00
parent 71d7c51bd2
commit f4dc1fea16

View file

@ -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();