2024-07-27 02:39:18 -04:00
|
|
|
const index = require('../index.js')
|
2024-07-28 02:37:31 -04:00
|
|
|
module.exports = {
|
|
|
|
load: () => {
|
|
|
|
},
|
|
|
|
loadBot: (b) => {
|
|
|
|
b._client.on('end', () => {
|
|
|
|
b.info('bot ' + b.id + ' disconnected')
|
|
|
|
for (const i in b.interval) {
|
|
|
|
clearInterval(b.interval[i])
|
|
|
|
}
|
|
|
|
setTimeout(() => {
|
|
|
|
b.info('Re-connecting bot ' + b.id)
|
|
|
|
index.createBot(b.host, b.id)
|
|
|
|
}, 5000)
|
|
|
|
})
|
|
|
|
}
|
2024-07-27 02:39:18 -04:00
|
|
|
}
|