var Bot = require('../index');var AUTH = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'var USERID = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';var ROOMID = '507a0b4baaa5cd14e2000266';var bot = new Bot(AUTH, USERID, ROOMID);bot.on('speak', function (data) { // Get the data var name = data.name; var text = data.text; if (text.match(/^\/join$/)) { bot.addDj(); } else if (text.match(/^\/leave$/)) { bot.remDj(); } else if (text.match(/^\/skip$/)) { bot.skip(); } else if (text.match(/^\/snag$/)) { bot.roomInfo(function(data) { var songid = data.room.metadata.current_song._id; var song = data.room.metadata.current_song.metadata.song; bot.snag(); bot.playlistAll(function(playlist) { // Use the length so that it gets added to the end of the list. bot.playlistAdd(songid, playlist.list.length); }); bot.speak('Added '+song+' to the playlist.'); }); } else if (text.match(/^\/yw$/)) { bot.speak("You're Winner!"); } else if (text.match(/should +i +play/i)) { bot.speak('@'+name+' play BACK THAT AZZ UP!'); } else if (text.match(/bop/)) { bot.speak('fetch YEAH I LOVE THIS SONG!!!'); bot.bop(); } else if (text.match(/turd/)) { bot.speak("BOO THIS poo poo SUCKS!!!"); bot.vote('down'); }});bot.on('endsong', function (data) { var room = data.room; var song = room.metadata.current_song.metadata.song; var upvotes = room.metadata.upvotes; var downvotes = room.metadata.downvotes; bot.speak(':musical_note: '+song+' :thumbsup: '+upvotes+' :thumbsdown: '+downvotes+'');});
but djsteevbot is right there
// MY CODE IS RETARDED I DON'T KNOW JAVASCRIPT!!!!var Bot = require('../index');var AUTH = 'XXX'var USERID = 'XXX';var ROOMID = '507a0b4baaa5cd14e2000266';var bot = new Bot(AUTH, USERID, ROOMID);var djs = {};bot.on('speak', function (data) { // Get the data var name = data.name; var text = data.text; if (text.match(/^\/join$/)) { bot.addDj(); } else if (text.match(/^\/leave$/)) { bot.remDj(); } else if (text.match(/^\/skip$/)) { bot.skip(); } else if (text.match(/^\/snag$/)) { bot.roomInfo(function(data) { var songid = data.room.metadata.current_song._id; var song = data.room.metadata.current_song.metadata.song; bot.snag(); bot.playlistAll(function(playlist) { // Use the length so that it gets added to the end of the list. bot.playlistAdd(songid, playlist.list.length); }); bot.speak('Added '+song+' to the playlist.'); }); } else if (text.match(/^\/yw$/)) { bot.speak("You're Winner!"); } else if (text.match(/should +i +play/i)) { bot.speak('@'+name+' play BACK THAT AZZ UP!'); } else if (text.match(/bop/)) { bot.speak('unicorn YEAH I LOVE THIS SONG!!! <3'); bot.bop(); } else if (text.match(/turd/)) { bot.speak("BOO THIS poo poo SUCKS!!!"); bot.vote('down'); } else if (text.match(/^\/kickme [0-9]+$/)) { var djId = data.userid; var num = parseInt(text.substring(8)); if (djs[djId]) { djs[djId].nbSong = 0; // reset plays djs[djId].songsLimit = num; bot.speak('@'+name+' I will remove you after '+num+' plays.'); } } else if (text.match(/^\/setlaptop .+$/)) { var type = text.substring(11); bot.modifyLaptop(type); } else if (text.match(/^\/setavatar [0-9]+$/)) { num = parseInt(text.substring(11)); bot.setAvatar(num); }});bot.on('endsong', function (data) { var room = data.room; var song = room.metadata.current_song.metadata.song; var upvotes = room.metadata.upvotes; var downvotes = room.metadata.downvotes; bot.speak(':musical_note: '+song+' :thumbsup: '+upvotes+' :thumbsdown: '+downvotes+''); var djId = data.room.metadata.current_dj; if (djs[djId] && djs[djId].songsLimit > 0 && ++djs[djId].nbSong >= djs[djId].songsLimit) { bot.remDj(djId); delete djs[djId]; }});bot.on('roomChanged', function (data) { var currentDjs = data.room.metadata.djs; for (var i = 0; i < currentDjs.length; i++) { djs[currentDjs[i]] = { nbSong: 0, songsLimit: 0 }; }});bot.on('add_dj', function (data) { djs[data.user[0].userid] = { nbSong: 0, songsLimit: 0 };});bot.on('rem_dj', function (data) { delete djs[data.user[0].userid];});
do i get a achievement cube for it
Quote from: STEEV LION on 25-10-2012, 00:06:14 AMdo i get a achievement cube for itNo, but I love you.