Created
March 9, 2012 03:57
-
-
Save jlbruno/2004944 to your computer and use it in GitHub Desktop.
viclou/Turntable-API/custom code/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Avatars | |
bot.on('speak', function (data) { | |
// console.log('chat', data); | |
var text = data.text; | |
var name = data.name; | |
//PART 1 | |
if (text.match(/^\/closeeyedgirl/)) { | |
bot.setAvatar ('1'); | |
} | |
if (text.match(/^\/greengirl/)) { | |
bot.setAvatar ('2'); | |
} | |
if (text.match(/^\/redgirl/)) { | |
bot.setAvatar ('3'); | |
} | |
if (text.match(/^\/pellirojogirl/)) { | |
bot.setAvatar ('4'); | |
} | |
if (text.match(/^\/pointyboy/)) { | |
bot.setAvatar ('5'); | |
} | |
if (text.match(/^\/twiggirl/)) { | |
bot.setAvatar ('6'); | |
} | |
if (text.match(/^\/ordinaryboy/)) { | |
bot.setAvatar ('7'); | |
} | |
if (text.match(/^\/gingerboy/)) { | |
bot.setAvatar ('8'); | |
} | |
//PART 2 | |
if (text.match(/^\/tanbear/)) { | |
bot.setAvatar ('9'); | |
} | |
if (text.match(/^\/sickbear/)) { | |
bot.setAvatar ('10'); | |
} | |
if (text.match(/^\/greenbear/)) { | |
bot.setAvatar ('11'); | |
} | |
if (text.match(/^\/monsterbear/)) { | |
bot.setAvatar ('12'); | |
} | |
if (text.match(/^\/rickybear/)) { | |
bot.setAvatar ('13'); | |
} | |
if (text.match(/^\/tealbear/)) { | |
bot.setAvatar ('13'); | |
} | |
if (text.match(/^\/redbear/)) { | |
bot.setAvatar ('14'); | |
} | |
if (text.match(/^\/orangebear/)) { | |
bot.setAvatar ('15'); | |
} | |
if (text.match(/^\/evilbear/)) { | |
bot.setAvatar ('16'); | |
} | |
if (text.match(/^\/bluebear/)) { | |
bot.setAvatar ('17'); | |
} | |
// PART 3 | |
if (text.match(/^\/bluecat/)) { | |
bot.setAvatar ('18'); | |
} | |
if (text.match(/^\/greencat/)) { | |
bot.setAvatar ('19'); | |
} | |
if (text.match(/^\/pinkcat/)) { | |
bot.setAvatar ('121'); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Avatars | |
bot.on('speak', function (data) { | |
// console.log('chat', data); | |
var text = data.text; | |
var name = data.name; | |
//PART 1 | |
if (text.match(/^\/closeeyedgirl/)) { | |
bot.setAvatar ('1'); | |
} | |
if (text.match(/^\/greengirl/)) { | |
bot.setAvatar ('2'); | |
} | |
if (text.match(/^\/redgirl/)) { | |
bot.setAvatar ('3'); | |
} | |
if (text.match(/^\/pellirojogirl/)) { | |
bot.setAvatar ('4'); | |
} | |
if (text.match(/^\/pointyboy/)) { | |
bot.setAvatar ('5'); | |
} | |
if (text.match(/^\/twiggirl/)) { | |
bot.setAvatar ('6'); | |
} | |
if (text.match(/^\/ordinaryboy/)) { | |
bot.setAvatar ('7'); | |
} | |
if (text.match(/^\/gingerboy/)) { | |
bot.setAvatar ('8'); | |
} | |
//PART 2 | |
if (text.match(/^\/tanbear/)) { | |
bot.setAvatar ('9'); | |
} | |
if (text.match(/^\/sickbear/)) { | |
bot.setAvatar ('10'); | |
} | |
if (text.match(/^\/greenbear/)) { | |
bot.setAvatar ('11'); | |
} | |
if (text.match(/^\/monsterbear/)) { | |
bot.setAvatar ('12'); | |
} | |
if (text.match(/^\/rickybear/)) { | |
bot.setAvatar ('13'); | |
} | |
if (text.match(/^\/tealbear/)) { | |
bot.setAvatar ('13'); | |
} | |
if (text.match(/^\/redbear/)) { | |
bot.setAvatar ('14'); | |
} | |
if (text.match(/^\/orangebear/)) { | |
bot.setAvatar ('15'); | |
} | |
if (text.match(/^\/evilbear/)) { | |
bot.setAvatar ('16'); | |
} | |
if (text.match(/^\/bluebear/)) { | |
bot.setAvatar ('17'); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Laptops | |
bot.on('speak', function (data) { | |
var text = data.text; | |
if (text.match(/^\/chrome/)) { | |
bot.modifyLaptop ('chrome'); | |
} | |
if (text.match(/^\/pc/)) { | |
bot.modifyLaptop ('pc'); | |
} | |
if (text.match(/^\/mac/)) { | |
bot.modifyLaptop ('mac'); | |
} | |
if (text.match(/^\/linux/)) { | |
bot.modifyLaptop ('linux'); | |
} | |
if (text.match(/^\/iphone/)) { | |
bot.modifyLaptop ('iphone'); | |
} | |
if (text.match(/^\/forcechrome/)) { | |
bot.remDj(); | |
bot.modifyLaptop ('chrome'); | |
setTimeout(function () { bot.addDj(); }, 50); | |
} | |
if (text.match(/^\/forcepc/)) { | |
bot.remDj(); | |
bot.modifyLaptop ('pc'); | |
setTimeout(function () { bot.addDj(); }, 50); | |
} | |
if (text.match(/^\/forcemac/)) { | |
bot.remDj(); | |
bot.modifyLaptop ('mac'); | |
setTimeout(function () { bot.addDj(); }, 50); | |
} | |
if (text.match(/^\/forcelinux/)) { | |
bot.remDj(); | |
bot.modifyLaptop ('linux'); | |
setTimeout(function () { bot.addDj(); }, 50); | |
} | |
if (text.match(/^\/forceiphone/)) { | |
bot.remDj(); | |
bot.modifyLaptop ('iphone'); | |
setTimeout(function () { bot.addDj(); }, 50); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment