chomens-bot-js/plugins/hash.js

14 lines
542 B
JavaScript
Raw Normal View History

2022-08-14 05:51:45 -04:00
/* eslint-disable max-len */
const crypto = require('crypto');
module.exports = {
2022-11-06 03:30:25 -05:00
inject: function(bot, dcclient, config) {
2022-10-29 20:43:37 -04:00
const interval = setInterval(() => {
bot.hash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + config.keys.normalKey).digest('hex').substring(0, 16);
bot.ownerHash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + config.keys.ownerHashKey).digest('hex').substring(0, 16);
2022-11-07 08:09:29 -05:00
}, 9000);
2022-09-11 00:36:33 -04:00
bot.on('end', () => {
2022-10-29 20:43:37 -04:00
clearInterval(interval);
2022-09-11 00:36:33 -04:00
});
2022-08-14 05:51:45 -04:00
},
};