mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-12-01 06:35:41 -05:00
cloop reset bullshit
This commit is contained in:
@@ -2,7 +2,12 @@ function command_loop (bot, options, config) {
|
||||
bot.cloop = {
|
||||
list: [],
|
||||
add (command, interval) {
|
||||
this.list.push({ timer: setInterval(() => bot.core.run(command), interval), command, interval })
|
||||
setTimeout(() => {
|
||||
this.list.push({ timer: setInterval(() => bot.core.run(command), interval), command, interval })
|
||||
}, 10)
|
||||
bot.on('end', () => {
|
||||
this.clear()
|
||||
})
|
||||
},
|
||||
|
||||
remove (index) {
|
||||
@@ -14,5 +19,10 @@ function command_loop (bot, options, config) {
|
||||
this.list = []
|
||||
}
|
||||
}
|
||||
/* bot.on('end', () => {
|
||||
// clearInterval(this.list);
|
||||
for (const cloop of this.list) console.log(cloop)
|
||||
console.log('e')
|
||||
})*/
|
||||
}
|
||||
module.exports = command_loop;
|
||||
|
||||
Reference in New Issue
Block a user