forked from f0ck/f0ckv2
Initial commit
This commit is contained in:
28
src/index.mjs
Normal file
28
src/index.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
import { logger } from "./inc/log";
|
||||
import { read, cfg } from "./inc/cfg";
|
||||
import { wrapper } from "./inc/wrapper";
|
||||
|
||||
import triggers from "./inc/trigger";
|
||||
import events from "./inc/events";
|
||||
|
||||
read().then(() => {
|
||||
const self = {
|
||||
_trigger: new Map(),
|
||||
trigger: function trigger(args) {
|
||||
this.call = args.call;
|
||||
this.help = args.help || false;
|
||||
this.level = args.level || 0;
|
||||
this.active = args.hasOwnProperty("active") ? args.active : true;
|
||||
this.set = args.set || "all"; // uwe, nxy, f0ck, all
|
||||
this.clients = args.clients || ["irc", "tg", "discord"];
|
||||
this.f = args.f;
|
||||
},
|
||||
bot: new wrapper()
|
||||
};
|
||||
|
||||
triggers.forEach(mod => {
|
||||
console.log(mod);
|
||||
mod(self);
|
||||
});
|
||||
events.forEach(event => event(self));
|
||||
}).catch(err => logger.error(`(main) ${err.message}`));
|
Reference in New Issue
Block a user