alaingilbert / Turntable-API

Allows you to create bots for turntable.fm
http://alaingilbert.github.com/Turntable-API/
MIT License
318 stars 97 forks source link

New Examples(Fixed Version) #177

Closed ghost closed 11 years ago

ghost commented 11 years ago

Added Auto DJ Bot, Autosnag, and Manual DJ Bot. Fixed coding to 2 spaces indented.

I hope the coding format is finally right because this will benefit new bot makers that use this API.

:)

alaingilbert commented 11 years ago

I'll give you an example for the intentation. This stuff :

bot.on ('endsong', function (data) {
// Update 'imDjing' when Bot's song ends
  var djid = data.room.metadata.current_song.djid;
  if (djid == USERID){
  imDjing = false;
  }
// If triggered to get down during Bot's song, step down now
  if (getDownAfterSong == true){
  bot.remDj(USERID);
  getDownAfterSong = false;
  }
  });

should look like this:

bot.on('endsong', function (data) {
  // Update 'imDjing' when Bot's song ends
  var djid = data.room.metadata.current_song.djid;
  if (djid == USERID) {
    imDjing = false;
  }
  // If triggered to get down during Bot's song, step down now
  if (getDownAfterSong) {
    bot.remDj(USERID);
    getDownAfterSong = false;
  }
});