samuri51 / chillybot

a turntable bot created by a moderator of straight_chillin11
12 stars 12 forks source link

"Cannot read property 'name' of undefined" message after I use "node chillybot.js" command #19

Closed mnafricano closed 11 years ago

mnafricano commented 11 years ago

When I run node chillybot.js in Terminal on my Mac, Terminal returns the following:

TypeError: Cannot read property 'name' of undefined

The only changes I've made to my chillybot.js file are the following:

var AUTH = 'xxxxxxxxxxxxxxxxxxxxxxxx';
var USERID = 'xxxxxxxxxxxxxxxxxxxxxxxx';
var ROOMID = 'xxxxxxxxxxxxxxxxxxxxxxxx';

The following is a screenshot of my Terminal window displaying the error message Screen Shot 2013-04-28 at 10 56 46 PM

Thanks in advance.

oldramen commented 11 years ago

From what it looks like in the code, it's not connecting to the room, which is why it's getting an error. The "name" is the name of the room you're registering in. I would double check and make sure the roomid is accurate.

mnafricano commented 11 years ago

Thanks man, Turntable.FM is being tricky and won't let two accounts on a server at the same time. It's something new that they do now and I don't know how to get around it other than to have the bot on a remote server.

If you were putting a bot on a server, what free server business would you use? AppFog?

Thanks!

samuri51 commented 11 years ago

are you saying you can't have your main account logged in and your bot running from command line at the same time? they are two different accounts right?. i'm only asking because i just tested it and i can have both of my accounts on at the same time. make sure that when you use the alan gilbert bookmark that your logged in as your bot in the room that you want to log into. another thing to make sure of is that there are no spaces before or after your room id as they will be literally processed and it won't work. also make sure that you installed the ttapi in the same folder as the chillybot.js file. let me know if this works for you. as far as appfog goes, yes it works fine, thats what i use to host my bot :D

an example room id would look like this, double check you userid and auth are correct as well, remember no spaces!

var ROOMID = '5177a500df5bcf448bf82d0e'; 
mnafricano commented 11 years ago

Yeah, that's exactly what I'm saying. They are two different accounts. That's weird the you are able to run your bot and your account at the same time. Do you know of any server that I could host my bot on?

mnafricano commented 11 years ago

Never mind, I guess it was just my account acting up. I'm good to go now, and if you'd like, you can test my bot here.

mnafricano commented 11 years ago

Although, I still would like to perhaps run my bot from a remote server, if that would be possible.

Thanks for chillybot.js!

samuri51 commented 11 years ago

glad its working for you :), hope u like it