YOUREWINNER.COM
 
   

I Made Us A Turntable.fm Room...
 
Dissident
#106 23-10-2012, 12:03:04 PM
  • the ultimate, the muffin man
  • Administrator
  • *****
    *****
    *****
    *****
    *****
    *****
  • Posts: 17737
  • Rigcoins: 99799567.19
  • Send Money to Dissident
    Thumb Up
  • dissident b shirtweeaboosexual orientation unclear+
  • "smash the patriarchy"
I will add more michael jackson




Dissident International Anti-Furry Organization
#107 23-10-2012, 12:10:59 PM
  • Guest
Here's the code to djsteevbot. You must substitute your own AUTH and USERID values (instructions in link below).

I think it would be a good idea to have at least 10 bots in the room at all times even though it's probably against the rules.

http://www.allenrothschild.com/blog/2012/04/how-to-make-a-turntable-fm-bot/

Code: [Select]
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+'');
});


Svetlana
#108 23-10-2012, 12:34:47 PM
  • forum's girl mascot
  • *****
    *****
    ***
  • Posts: 3742
  • Rigcoins: 9634722.71
  • Send Money to Svetlana
    Thumb Up
  • Dust II OwnsPortugueseLotus 3 soundtrack+
  • "what do you mean it's not 1986"
i can confirm stealthy works, i have it on chrome just for turntable.fm now and i can keep on using firefox for everything else un-proxied


lana_chan my name is erin
Cirus
#109 23-10-2012, 19:40:53 PM
The bot has the incorrect back that azz up queued, he is playing the edited version. It needs to be the one that says feat Manny or whatever


Svetlana
#110 23-10-2012, 20:38:51 PM
  • forum's girl mascot
  • *****
    *****
    ***
  • Posts: 3742
  • Rigcoins: 9634722.71
  • Send Money to Svetlana
    Thumb Up
  • Dust II OwnsPortugueseLotus 3 soundtrack+
  • "what do you mean it's not 1986"
i got in the turntable room and djsteevbot was playing The Vapors, instantly fan'd

edit: instantly followed by Superman by Goldfinger, this bot has it all


lana_chan my name is erin
#111 23-10-2012, 21:15:12 PM
  • Guest
yes i tried to load him up with lots of winner music


#112 24-10-2012, 22:44:29 PM
  • Guest
This is the song I play when you guys aren't there


Dissident
#113 24-10-2012, 23:26:00 PM
  • the ultimate, the muffin man
  • Administrator
  • *****
    *****
    *****
    *****
    *****
    *****
  • Posts: 17737
  • Rigcoins: 99799567.19
  • Send Money to Dissident
    Thumb Up
  • dissident b shirtweeaboosexual orientation unclear+
  • "smash the patriarchy"
but djsteevbot is right there




Dissident International Anti-Furry Organization
#114 24-10-2012, 23:48:06 PM
- Last Edit: 25-10-2012, 00:30:23 AM
  • Guest
but djsteevbot is right there

yeah he does keep me company

also djsteevbot code updated
Code: [Select]
// 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];
});

New commands:
/setlaptop <pc|mac|chrome|linux|iphone|android|chrome> - change djsteevbot's laptop
/setavatar <num> - change djsteevbot's avatar
/kickme <num> - if you're DJing, djsteevbot will take you down after <num> plays (Cirus requested this idk why)


JAVIKS
#115 24-10-2012, 23:56:35 PM
  • Global Moderator
  • *****
    *****
    *****
    *****
    *****
    *
  • Posts: 7052
  • Rigcoins: 366765.97
  • Send Money to JAVIKS
    Thumb Up
  • TAG TEAM CHAMPDadCoors Light Fan+
  • "cats are like potato chips"
because he always sets a playlists and leaves duh!


JAVIKS
Cirus
#116 24-10-2012, 23:59:01 PM
it is an incredibly useful feature


#117 25-10-2012, 00:06:14 AM
  • Guest
do i get a achievement cube for it


#118 25-10-2012, 00:06:36 AM
  • Guest
NO AFK DJS


Cirus
#119 25-10-2012, 01:08:00 AM
do i get a achievement cube for it

No, but I love you.


#120 25-10-2012, 01:11:47 AM
  • Guest
do i get a achievement cube for it

No, but I love you.

well that's almost as good as a achievement cube <3


0 Members and 1 Guest are viewing this topic.