Skip to content

Instantly share code, notes, and snippets.

@gempir
Created November 27, 2015 19:12
Show Gist options
  • Save gempir/3db1fd8eed16ea5cbcc0 to your computer and use it in GitHub Desktop.
Save gempir/3db1fd8eed16ea5cbcc0 to your computer and use it in GitHub Desktop.
Small twitch spam app for nodejs
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