ed53c4ac38
Linting!
17 lines
391 B
JavaScript
Executable file
17 lines
391 B
JavaScript
Executable file
const index = require('../index.js')
|
|
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)
|
|
})
|
|
}
|
|
}
|