Code Monkey home page Code Monkey logo

hashbot's Introduction

Basic start-up information:

Take the config.js.default file and rename it to config.js.  Update the default values to the proper values for your bot.

To figure out your AUTH, USERID and ROOMID, please follow the directions from the Turntable API Wiki:
https://github.com/alaingilbert/Turntable-API/wiki/How-to-find-the:-auth,-userid-and-roomid

To figure out the TWITTER* config settings:
Create a twitter account
Register a twitter application through dev.twitter.com
Make sure the application has read/write/direct message access
Generate the Consumer Key and Consumer Secret

Commands with variable types I used to create the tables in the MySQL DB:

CREATE TABLE IF NOT EXISTS `last_seen` (
  `user_id` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
  `room_id` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
  `timestamp` datetime NOT NULL,
  PRIMARY KEY (`user_id`,`room_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `songs` (
  `id` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
  `room_id` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
  `awesomes` int(11) NOT NULL DEFAULT '0',
  `lames` int(11) NOT NULL DEFAULT '0',
  `snags` int(11) NOT NULL DEFAULT '0',
  `playcount` int(11) NOT NULL DEFAULT '0',
  `lastplayed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `starttime` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
  `currentawesomes` int(11) NOT NULL DEFAULT '0',
  `currentlames` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,`room_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `users` (
  `id` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`,`name`),
  FULLTEXT KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.