database connectivity for timers

This commit is contained in:
Flummi
2018-03-03 07:12:40 +01:00
parent 703152f170
commit 47faa9dff4
5 changed files with 76 additions and 19 deletions

View File

@@ -11,6 +11,7 @@ export class discord extends EventEmitter {
this.options = options || {};
this.token = options.token || null;
this.set = this.options.set || "all";
this.network = "discord";
this.bot = new Discord.Client();
this.bot.login(this.token);
@@ -74,6 +75,9 @@ export class discord extends EventEmitter {
break;
}
}
sendmsg(mode, recipient, msg) {
this.bot.channels.get(recipient).send(msg);
}
format(msg) {
if(this.server.spurdo)
msg = spurdo(msg);