mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
add some interval to the hash plugin
This commit is contained in:
parent
90a53ab713
commit
9127df9ee3
1 changed files with 6 additions and 2 deletions
|
@ -2,11 +2,15 @@
|
|||
const crypto = require('crypto');
|
||||
module.exports = {
|
||||
inject: function(bot) {
|
||||
setInterval(() => {
|
||||
const hashInterval = setInterval(() => {
|
||||
bot.hash = crypto.createHash('md5').update(Math.floor(Date.now() / 1000).toString() + 'chomens1!1!').digest('hex').toString().substring(0, 16);
|
||||
}, 1000);
|
||||
setInterval(() => {
|
||||
const ownerHashInterval = setInterval(() => {
|
||||
bot.ownerHash = crypto.createHash('md5').update(Math.floor(Date.now() / 1000).toString() + 'ownermogus').digest('hex').toString().substring(0, 16);
|
||||
}, 1000);
|
||||
bot.on('end', () => {
|
||||
clearInterval(hashInterval);
|
||||
clearInterval(ownerHashInterval);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue