Closed gabebw closed 12 years ago
Which adapter are you using? We are facing similar issue on the partychat adapter. See https://github.com/iangreenleaf/hubot-partychat-hooks/pull/5 for more info.
We're using the Campfire adapter - haven't changed any code, only added to hubot-scripts.json
and package.json
, and of course added to the scripts/
directory.
Our source is at https://github.com/sdslabs/bot. We're using v2.3.2 of hubot, for reference.
I see the problem. For a given hubot-script, you need to only have it listed in hubot-scripts.json or have a copy of it in scripts. It looks like you do both, so the script gets loaded twice.
On Oct 22, 2012, at 12:59 AM, Abhay Rana notifications@github.com wrote:
Our source is at https://github.com/sdslabs/bot. We're using v2.3.2 of hubot, for reference.
— Reply to this email directly or view it on GitHub.
I changed hubot-scripts.json
to only contain an empty array and kept the scripts in scripts/
, which fixed it. Thanks @technicalpickles.
Cool, glad that did it. Unless you've customized the scripts, I would actually suggest the other way around. That way, you only have your custom scripts in scripts/, and you get any updates from hubot-scripts by just updating that dependency.
On Oct 22, 2012, at 10:09 AM, Gabe Berke-Williams notifications@github.com wrote:
I changed hubot-scripts.json to only contain an empty array and kept the scripts in scripts/, which fixed it. Thanks @technicalpickles.
— Reply to this email directly or view it on GitHub.
So - can I have my scripts/
directory be totally empty, and keep just the names in hubot-scripts.json
?
I tried it, but I got this error: Error: Cannot find module '/Users/gabe/thoughtbot/hideout-bot/node_modules/hubot-scripts/src/scripts/google-images'
Not totally empty, but you can remove anything that is listed in hubot-scripts.json. I think google-images would be one of the ones not in scripts/
On Oct 22, 2012, at 10:22 AM, Gabe Berke-Williams notifications@github.com wrote:
So - can I have my scripts/ directory be totally empty, and keep just the names in hubot-scripts.json?
I tried it, but I got this error: Error: Cannot find module '/Users/gabe/thoughtbot/hideout-bot/node_modules/hubot-scripts/src/scripts/google-images'
— Reply to this email directly or view it on GitHub.
I see doubled options in
hubot help
(pasted below) as well as doubled responses:hubot bees
pastes the Oprah bees gif twice, for example.hubot-scripts.json
: