mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-11-30 14:15:41 -05:00
v4.2.5
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
function inject (bot, options) {
|
||||
bot.cloop = {
|
||||
list: [""],
|
||||
|
||||
add (command, interval) {
|
||||
this.list.push({ timer: setInterval(() => bot.core.run(command), interval), command, interval })
|
||||
},
|
||||
|
||||
remove (index) {
|
||||
clearInterval(this.list[index].timer)
|
||||
},
|
||||
|
||||
clear () {
|
||||
for (const cloop of this.list) clearInterval(cloop.timer)
|
||||
|
||||
this.list = [""]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
Reference in New Issue
Block a user