alaingilbert / Turntable-API

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

Get the bot to snag a song? #35

Closed VegaChastain closed 12 years ago

VegaChastain commented 12 years ago

I know it is possible, I am just not familiar with how to make the bot produce the 'heart' from it's cute little head when i tell her to swipe a song. How do I modify the snag ( [ callback:fn ] ) to make my bot heart-burp on the /snag command? Thanks so much... I am learning! Vega

alaingilbert commented 12 years ago
bot.snag();

Nothing more. The heart will pop out of your head :)

VegaChastain commented 12 years ago

Um... before this is closed... I put the code in my js file, and nothing happens with the /snag command. I tried .snag and snag as well. I'm sorry I don't know more about arguments and functions, but I thought this was a simple copy/paste thing. Still stumped.

oldramen commented 12 years ago

Paste the code, please. Remember to edit out the auth code. Use pastebin if you wish, makes reading it easier.

VegaChastain commented 12 years ago

Sorry... crap is long. (sparklebot) As you can see there are various other things giving me trouble... like the stagedive command... ugh. http://pastebin.com/buQ4jWFz

oldramen commented 12 years ago

You can't just add the code in there willy nilly!

find this code:

case 'vote':
                if (jsonmsg.parameter == 'up') {
                    bot.vote('up');
                } else if (jsonmsg.parameter == 'down') {
                    bot.vote('down');
                }
                break;

and beneath it, add:

case 'snag':
                bot.snag();
                break;
VegaChastain commented 12 years ago

Sorry... I take 'nothing more' very literally! lol I am not worthy. VC

VegaChastain commented 12 years ago

I have tried a lot of fooling around with this... but still not functional... http://pastebin.com/0bAWQDVD

oldramen commented 12 years ago

Anything more than that is specific to the way sparklebot is coded. I suggest opening an issue there.

VegaChastain commented 12 years ago

ahhhhhh okey dokey. thanks :)