Skip to content

Instantly share code, notes, and snippets.

@victoryforphil
Created July 13, 2017 21:17
Show Gist options
  • Save victoryforphil/62667fcbeab070af323b80137ffe3b76 to your computer and use it in GitHub Desktop.
Save victoryforphil/62667fcbeab070af323b80137ffe3b76 to your computer and use it in GitHub Desktop.
const tmi = require('tmi.js');
const sleep = require('system-sleep');
const io = require('socket.io-client');
const IRCUtils = require('./IRCUtils.js');
class IRCPlugin {
constructor() {
var self = this;
self.DB = {};
self.utils = {};
self.socket = io('http://localhost:3000');
}
Init(onComplete) {
var self = this;
self.disnode.db.InitPromise({}).then(function(dbo) {
self.DB = dbo;
self.utils = new IRCUtils(self);
onComplete();
});
}
default (command) {
var self = this;
}
stop(command) {
var self = this;
if (command.msg.author.id == '160168328520794112') {
self.utils.irc('stop', command);
}
}
start(command) {
var self = this;
if (command.msg.author.id == '160168328520794112') {
self.socket.emit("start");
}
}
}
module.exports = IRCPlugin;
// Made by Hazed SPaCE✘#2574
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment