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

Holliday Avatars not allowed ? #258

Closed mcgrailm closed 10 years ago

mcgrailm commented 10 years ago

I typically make it so the bots can take on the holiday avatars. However, I am now getting an error.

{ msgid: 152, err: 'not allowed to set avatar to 62', success: false }

I've checked the id to make sure the id number i was right and then checked to see what avatars are available to the bot and got :

{ ids: [ 1, 1003, 3, 4, 6, 1004, 7, 8, 34, 5, 2, 1002, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 121, 20, 21, 22, 23, 36, 37, 27, 28, 29, 30, 31, 32, 33 ], success: true }

So I'm not sure if this is a problem with the API or TT or both ?

Izzmo commented 10 years ago

Stupid question but you sure your bot has enough points?

mcgrailm commented 10 years ago

well 62 is the first halloween custom in the first group which is available to djs with a point level count of 0 :)

ghost commented 10 years ago

@mcgrailm just log into the bot's account on turntable and manually switch him/her to the halloween avatars.

mcgrailm commented 10 years ago

not all of my bots have accounts attached to them, and that's not really the point. I want to know if this is an issue with tt or with the api

Izzmo commented 10 years ago

All of your bots have accounts attached to them... not sure why you would think otherwise.

As far as you not be allowed to switch to a certain avatar, that's odd. I would try logging in manually and see about changing it through the website.

mcgrailm commented 10 years ago

well I logged into the one of the bots that i know has an account and I can change it there but i can't change it pragmatically

mcgrailm commented 10 years ago

and i even if i could i wouldn't want to log into 50+ bots lol

Izzmo commented 10 years ago

50 bots? What for?

mcgrailm commented 10 years ago

yes for the 50 rooms that they go in :)

Izzmo commented 10 years ago

I have a hard time believing you have 50 distinct bots in 50 unique rooms.. does anyone frequent these rooms?

mcgrailm commented 10 years ago

I could probably trim a few due to in activity but I do indeed have 50 bots in 50 rooms but that is really off the topic. if you'd like to have further discussion on the topic I'll be happy to talk to you in private

Izzmo commented 10 years ago

True. Well I'm not really sure why you can't update yours.

You keep saying your bots do not have accounts, but everyone, even guests, have accounts. How exactly are you connecting without having accounts? Trick question, you aren't :) But I am trying to understand your logic here. Post some code maybe?

mcgrailm commented 10 years ago

I just mean that they are not connected to a fb or twitter or email , i still have authid and botid

anyhow here is a sample

var Bot = require('ttapi');
var bot = new Bot(AUTH, USERID, ROOMID);

bot.on('speak', function (data) {
  if (!isNaN(data.text)) {
    bot.setAvatar(data.text, function(data) {
        console.log(data);
    });
  }
});

bot.on('update_user', function(data) {
    console.log(data);
});

just put in your info , then when in the room with the bot type a number and the bot will try to change to an avatar of that id. Also if you change your id it logs the changes so you can tell what id is what :)

ghost commented 10 years ago

@mcgrailm is that the full code, and it would look nicer if you do it in a code block.

mcgrailm commented 10 years ago

that is all the code that is required to see the problem

Izzmo commented 10 years ago

@mcgrailm How do you not have a email associated with the accounts? There's only one way I know of that being done.

Can you give me some of your bots userid's so I can look them up?

mcgrailm commented 10 years ago

lol no , it really has nothing to do with my question here

Izzmo commented 10 years ago

Yes.. it does. And why does it matter if I have a userid of your bot, lol. If you don't want help, then I'll close this ticket and be done with it.

gizmotronic commented 10 years ago

I've confirmed that we're using the same API call as on the web client. In that light a message like "not allowed to [...]" looks like an explicit denial from Turntable, not a bug.

I've also confirmed that telling Turntable that we are a web client isn't sufficient to remove the restriction. If you can find a way around this, please feel free to submit a merge request.