samuri51 / chillybot

a turntable bot created by a moderator of straight_chillin11
12 stars 12 forks source link

took out extra newsong event #18

Closed samuri51 closed 11 years ago

samuri51 commented 11 years ago

i took out the extra new song event, been meaning to do this for a while. there should really only be one of each type of event anyways, changed the extra event into a function and called it at the end of the first event. should hopefully add more stability and seems to run a little faster too.

changed, this around line 468

bot.on('newsong', function (data)
{

to


global.checkOnNewSong = function (data)
{

and took out the end brackets so this around line 555

});

becomes

}

and added

checkOnNewSong(data);

to the very bottom of the second new song event starting around 562, see the changes here https://github.com/samuri51/chillybot/blob/master/chillybot.js

and compare it to your own script if you don't know what i'm talking about