chomens-bot-js/plugins/hash.js

15 lines
525 B
JavaScript
Raw Normal View History

2022-11-27 02:35:28 -05:00
const crypto = require('crypto')
2022-08-14 05:51:45 -04:00
module.exports = {
2022-11-27 02:35:28 -05:00
inject: function (bot, dcclient, config) {
bot.hash = ''
2022-10-29 20:43:37 -04:00
const interval = setInterval(() => {
2022-11-27 02:35:28 -05:00
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)
}, 2000)
2022-11-30 04:45:20 -05:00
bot.on('end', () => {
2022-11-27 02:35:28 -05:00
clearInterval(interval)
})
}
}