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

Bot Uptime #213

Closed ghost closed 11 years ago

ghost commented 11 years ago

Can you guys help me write up a code that checks the uptime of my bot?

technobly commented 11 years ago

crickets chirping

MikeWills commented 11 years ago

Well... on startup. Get the new Date() and save it in a global variable. Then when requesting the uptime. Do a date comparison (google "javascript date comparison") to get your uptime. That should be enough with Google and trial and error to figure it out. Post your code if you have further questions.

ghost commented 11 years ago

I googled it, but i can't find a simple way to code it

MikeWills commented 11 years ago

Sometimes things aren't as easy as it seems. Sometimes you can look through other people's bots for a complete method that does the comparison. ;-)

ghost commented 11 years ago

Ok, which bots can I look at to get the coding for bot uptime?

MikeWills commented 11 years ago

I would start with the bot run by they guy that suggested it. Check out Uglee's code. Mainly the functions.js file.  — Sent from Mailbox for iPad

On Sat, Jun 1, 2013 at 8:49 PM, Turntablelover notifications@github.com wrote:

Ok, which bots can I look at to get the coding for bot uptime?

Reply to this email directly or view it on GitHub: https://github.com/alaingilbert/Turntable-API/issues/213#issuecomment-18800410

technobly commented 11 years ago

All of the ones we've previously told you about, except you'll have to figure out if they have an uptime command though.

MikeWills commented 11 years ago

Mine doesn't. But it has a date comparison for checking idle times of users.  — Sent from Mailbox for iPad

On Sat, Jun 1, 2013 at 10:36 PM, DubbyTT notifications@github.com wrote:

All of the ones we've previously told you about, except you'll have to figure out if they have an uptime command though.

Reply to this email directly or view it on GitHub: https://github.com/alaingilbert/Turntable-API/issues/213#issuecomment-18801390

technobly commented 11 years ago

Mine has a sweet uptime command, complete with last downtime and re-login count :) Not open source though.

ghost commented 11 years ago

ok, thanks for the help.