Open downright770 opened 7 years ago
You need to add this module in two places:
package.json
(npm install --save hubot-xkcd
)external-scripts.json
(or whatever it’s actually called)Be sure to npm install
to update the node modules locally & ensure they install without any difficulty.
The README needs to be updated to tell you to run npm install --save hubot-xkcd
, it’s missing the --save
argument which adds the entry to your Hubot instance’s package.json
.
npm install --save hubot-xkcd
External scripts [ "hubot-diagnostics", "hubot-help", "hubot-google-images", "hubot-google-translate", "hubot-pugme-reddit", "hubot-maps", "hubot-redis-brain", "hubot-rules", "hubot-shipit", "hubot-darksky", "hubot-gif", "hubot-time-me", "hubot-voting", "hubot-xkcd", "hubot-relevant-xkcd", "hubot-youtube", "hubot-hackernews" ]
ran cmd, doesn't do anything for me.
I have hubot setup running from a shell script.
@downright770 is this the standard script that Hubot comes with when you generate one?
Sorry new to alot of this. For the external scripts I've just been adding to it.
or do you mean the shell script?
I mean the shell script.
I’m curious how you’re running Hubot; if it’s non-standard, something may be missing.
export MATTERMOST_HOST=127.0.0.1 export MATTERMOST_WSS_PORT=8065 export MATTERMOST_HTTP_PORT=8065 export MATTERMOST_TLS_VERIFY=false export MATTERMOST_USE_TLS=false export MATTERMOST_USER=bot@.io export MATTERMOST_PASSWORD= export MATTERMOST_GROUP=int1 export MATTERMOST_LOG_LEVEL=debug
export MATTERMOST_ENDPOINT=bot/incoming export MATTERMOST_INCOME_URL=http://localhost:8065/int1/channels/jgq6ksc5hirbd87g1ag7qudujr__nnnkd53nci8kifu6jadccmmqwy export MATTERMOST_TOKEN=""
export HUBOT_DARK_SKY_API_KEY=
export HUBOT_IMGUR_CLIENT_ID= export HUBOT_TIMEZONEDB_API_KEY= export HUBOT_GOOGLE_CSE_ID="" export HUBOT_GOOGLE_CSE_KEY="" export HUBOT_YOUTUBE_API_KEY=""
cd /home/chat/mybot bin/hubot --adapter matteruser #> /var/log/hubot.log 2>&1
Well, I’ve not used matteruser, so I can’t speak to how their adaptor works. But that script should work well enough.
Do your other external scripts work?
no other ones just the default stuff plus the exports in shell file.
When I ask “do your other external scripts work?” I am referring to what you have in external-scripts.json
.
So does the hubot-shipit
module work? Or hubot-youtube
? Or any of the others?
yes they do, but only ones that i called in the shell script
so "hubot-hackernews" doesn't work either
If I understand you correctly, only the modules that require, and have set, an env var (such as HUBOT_YOUTUBE_API_KEY
work correctly?
I should point out that there’s no reason for that; if a module doesn’t require any env vars to work properly (like hubot-xkcd
or hubot-hackernews
), then it should just work once it’s installed and added to external-scripts.json
Any chance you’re willing to share your entire hubot repo with me by inviting me as a collaborator?
Is there away to share the repo not sure how to do that. sorry feel like a nobe
See the docs on inviting collaborators to a personal repository
Okay Sorry I don't have a repo
Without being able to see all your code, I won’t be able to help any further. From what I can tell though, you’ve done everything right, so I’m at a loss.
Do the external scripts need heroku (think thats what its called)
@downright770 you might certainly try running your Hubot instance on Heroku, but they should work no matter where you are, esp. the ones that you trigger by messaging the bot itself.
That's what I thought. Thanks for the help though hope to figure this out at some point
Good luck!
Hi, I'm new to this stuff and setup adapter matteruser for mattermost chat client. I've been able to create a shell script to get certain API to work. When trying to use the external script for hubot-xkcd in my chat room nothing happens. I've added to external scripts, restarted hubot but now lost on what to do. I've noticed open ticket with robot.http and tried that but didn't work. Any help would be amazing thank you.