chomens-bot-js/plugins/hash.js
2022-09-11 11:36:33 +07:00

16 lines
652 B
JavaScript

/* eslint-disable max-len */
const crypto = require('crypto');
module.exports = {
inject: function(bot) {
const hashInterval = setInterval(() => {
bot.hash = crypto.createHash('md5').update(Math.floor(Date.now() / 1000).toString() + 'chomens1!1!').digest('hex').toString().substring(0, 16);
}, 1000);
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);
});
},
};