database connectivity for timers
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -98,6 +98,7 @@ export class irc extends EventEmitter {
|
||||
type: "irc",
|
||||
network: this.network,
|
||||
channel: tmp.params[0],
|
||||
channelid: tmp.params[0],
|
||||
user: Object.assign(this.parsePrefix(tmp.prefix), {
|
||||
account: this.server.user.geti(this.parsePrefix(tmp.prefix).nick).account,
|
||||
prefix: tmp.prefix.charAt(0) === ":" ? tmp.prefix.substring(1) : tmp.prefix,
|
||||
|
||||
@@ -100,6 +100,9 @@ export class tg extends EventEmitter {
|
||||
logger.error(`(${this.network}) ${err.message}`);
|
||||
});
|
||||
}
|
||||
sendmsg(mode, recipient, msg) {
|
||||
this.send(recipient, msg);
|
||||
}
|
||||
reply(tmp) {
|
||||
return {
|
||||
type: "tg",
|
||||
|
||||
Reference in New Issue
Block a user