atomjack / cmbot

A full featured bot for turntable.fm
59 stars 18 forks source link

Big problem, small fix? #55

Open XavrenJames opened 11 years ago

XavrenJames commented 11 years ago

was curious if there were any more in-depth instructions on how to set this bot up. i understand the javascripting, but im having issues with initial setup. every time i try to start my bot, this pops up: problem

the cmbot folder is in the same directory as BotGoneWild.js i feel like im missing a key piece of something here, directory looks like so: Capture

modules file is empty, cmbot is what was there after running 'npm install cmbot'

atomjack commented 11 years ago

Hmm try changing your .js file to do require('./cmbot');

instead?

XavrenJames commented 11 years ago

nope problem still persists. the cmbot folder consists of libraries and libraries of others that just seem to be repeats of themselves. they are the outcome of 'npm install cmbot'

atomjack commented 11 years ago

The cmbot folder should have the contents that you see on the main github page (ie, README.md, package.json, lib, and example_modules, etc.

Also, your .js file has var cmbot = require('\cmbot');

it should be var cmbot = require('.\cmbot');

XavrenJames commented 11 years ago

nope2 same issue.

atomjack commented 11 years ago

Ok first you had '\cmbot' and now '.cmbot' but it's supposed to be '.\cmbot'

dot backslash cmbot

require('.\cmbot');

XavrenJames commented 11 years ago

i know. i tried it a few different ways at first, but trust me its not working.

atomjack commented 11 years ago

How is your cmbot folder structured? Can you send a screenshot of its contents?

diginc commented 11 years ago

Just to give James an idea of a working installation's folder structure (on linux) here is my bot's folder structure. I removed my personal scripts, hopefully I didn't accidentally take out something critical.

edit: I'm not sure if my installation is a-typical but I have my cmbot folder in node_modules and then a 2nd node_module under cmbot with all of it's requirements. then my bot.js file is above the node_modules folder that contains cmbot in it. Maybe try putting cmbot in a node_modules folder? I'm pretty sure this is how NPM installed it for me.

xxx@xxx:~$ tree -L 4 └── bot.js # This is the bot launcher which should be based off of the readme's instructions & code directly after SETUP https://github.com/atomjack/cmbot#setup ├── djs.json # file generated by running bot to save DJ list ├── modules # your modules the bot reads on startup (or /loadmodule /unloadmodule) │   ├── bannedsongs.js │   ├── fixdjs.js │   ├── showdeckshitlist.js │   ├── showshitlist.js │   ├── slapcommand.js │   └── unplayed.js ├── node_modules │   └── cmbot │   ├── example_modules │   │   ├── google.js │   │   ├── greeting.js │   │   ├── songstats.js │   │   └── unplayed.js │   ├── lib │   │   ├── index.js │   │   ├── ttqueue.js │   │   └── TTUser.js │   ├── node_modules # I'm not listing all these sub-module requirements' file conetnts or this list would be huge: │   │   ├── crypto │   │   ├── dateformat │   │   ├── http-get │   │   ├── jquery │   │   ├── jsdom │   │   ├── mysql │   │   ├── ntwitter │   │   ├── path │   │   ├── querystring │   │   ├── simple-lastfm │   │   ├── sprintf │   │   ├── sqlite3 │   │   ├── ttapi │   │   └── xml2js │   ├── package.json │   └── README.md ├── settings.json # file generated by running bot

ItsJakeo commented 11 years ago

Just throwing this out there not possibly knowing what I'm talking about but try renaming your .js file to cmbot or in the file change to var cmbot = require('.\botgonewild'); something like that. No guarantees.