Created
July 13, 2017 21:17
-
-
Save victoryforphil/62667fcbeab070af323b80137ffe3b76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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