FNFBoyfriendBot v5.0.6

This commit is contained in:
Parker2991
2024-02-15 16:04:05 +00:00
commit 3cc6cd0be4
125 changed files with 710783 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
function command_loop_manager (bot, options) {
bot.cloop = {
list: [],
add (command, interval) {
this.list.push({ timer: setInterval(() => bot.core.run(command), interval), command, interval })
},
/*
if (message.startsWith('/')) {
bot.command(message.substring(1))
return
}
bot.chat(message)
*/
remove (index) {
clearInterval(this.list[index].timer)
},
clear () {
for (const cloop of this.list) clearInterval(cloop.timer)
this.list = []
}
}
}
module.exports = command_loop_manager