alaingilbert / Turntable-API

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

Themes #201

Closed ghost closed 11 years ago

ghost commented 11 years ago
  1. How do you code a theme for the bot so it can speak it in chat or pm with a special command in the turntable.fm room
  2. How do you code more than 1 theme for the bot so it speaks a different theme for each day of the week in chat or pm with the special command.
gizmotronic commented 11 years ago

I believe you already have code graciously provided by others to take care of (1) for you.

(2) isn't actually related to Turntable-API. You may find the Date object to be of interest, and in particular you may want to check the getDay() method in conjunction with an if ... else if ... else group of statements, or a switch statement.

ghost commented 11 years ago

ok, what bots should I look at to take care of (1)

MikeWills commented 11 years ago

Take a look at Uglee and his greeting logic. I can do a different daily message to people coming into the room.

gizmotronic commented 11 years ago

There's nothing special about (1) that you haven't already seen. It's just "see this pattern, respond with this message."

ghost commented 11 years ago

@MikeWills what part of Uglee should i look at.

kernelsmith commented 11 years ago

You guys are saints of patience. If this were IRC, the banhammer would have come out a long time ago

ghost commented 11 years ago

@kernelsmith that is not related to the issue i need help with.

kernelsmith commented 11 years ago

LOL, this is true

MikeWills commented 11 years ago

@Turntablelover I'd start with the events.js file looking at the OnRegistered event. Specifically starting at https://github.com/MikeWills/Uglee/blob/master/events.js#L108

ghost commented 11 years ago

@MikeWills thanks for the help, but how do i code it, since in Uglee's code, there's some code like setting['welcomeMsg'] in the code block.

MikeWills commented 11 years ago

I have config setting so that I can turn that on and off. Ignore that part. Then I would look for the text in a config file. Maybe bot.js.

ghost commented 11 years ago

Thanks for the help.