chomens-bot-js/plugins/hash.js

17 lines
616 B
JavaScript
Raw Normal View History

2022-08-14 05:51:45 -04:00
/* eslint-disable max-len */
const crypto = require('crypto');
module.exports = {
inject: function(bot) {
2022-09-11 00:36:33 -04:00
const hashInterval = setInterval(() => {
2022-10-18 05:07:28 -04:00
bot.hash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + 'chomens1!1!').digest('hex').substring(0, 16);
}, 5000);
2022-09-11 00:36:33 -04:00
const ownerHashInterval = setInterval(() => {
2022-10-18 05:07:28 -04:00
bot.ownerHash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + 'ownermogus').digest('hex').substring(0, 16);
}, 5000);
2022-09-11 00:36:33 -04:00
bot.on('end', () => {
clearInterval(hashInterval);
clearInterval(ownerHashInterval);
});
2022-08-14 05:51:45 -04:00
},
};