Created
November 27, 2015 19:12
-
-
Save gempir/3db1fd8eed16ea5cbcc0 to your computer and use it in GitHub Desktop.
Small twitch spam app for nodejs
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 irc = require('tmi.js'); | |
var options = { | |
options: { | |
debug: true | |
}, | |
connection: { | |
random: 'chat', | |
reconnect: true | |
}, | |
identity: { | |
username: 'username', | |
password: 'oauth:' | |
}, | |
channels: ['#nymn_hs'] | |
}; | |
var client = new irc.client(options); | |
client.connect(); | |
client.on('chat', function(channel, user, message, self) { | |
if (user.username == 'gempir' && message === 'timeToSpam') { | |
spam(); | |
} | |
}); | |
function spam() | |
{ | |
setInterval(function() { | |
var spamMessage = '. '; | |
var toSpam = 'MingLee'; | |
for (i = 0; i < 30; i++) { | |
spamMessage += toSpam + ' '; | |
} | |
client.say('#nymn_hs', spamMessage) | |
}, 3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment