Created
August 13, 2017 12:22
-
-
Save d0p3t/295a67c3b2310a8df577b8270f261133 to your computer and use it in GitHub Desktop.
This file contains 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
var tmi = require('tmi.js'); | |
var config = require('./config.js'); | |
var client = new tmi.client(config.tmi); | |
client.connect(); | |
client.on("subscription", function (channel, username, method, message, userstate) { | |
if (method.prime === true) { | |
console.log("Prime Sub"); | |
client.say(channel, "/me galeHEART galeHEY " + username + " has just subscribed with Twitch Prime! galeHEART galeHEY"); | |
} | |
else { | |
console.log("Normal Sub"); | |
client.say(channel, "/me galeHEART galeHEY " + username + " has just subscribed! galeHEART galeHEY"); | |
} | |
}); | |
client.on("resub", function (channel, username, months, message, userstate, methods) { | |
if (methods.prime === true) { | |
console.log("Resub prime"); | |
client.say(channel, "/me galeHEART RESUB HYPE galeHEART " + username + " has just re-subscribed for " + months + " months using Twitch Prime! galeHEY galeHEY (" + message + ")"); | |
} | |
else { | |
console.log("Normal Sub"); | |
client.say(channel, "/me galeHEART RESUB HYPE galeHEART " + username + " has just re-subscribed for " + months + " months! galeHEY galeHEY (" + message + ")"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment