Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

How to keep the bot online? #28

Open
davidvexel opened this issue Feb 2, 2018 · 4 comments
Open

How to keep the bot online? #28

davidvexel opened this issue Feb 2, 2018 · 4 comments

Comments

@davidvexel
Copy link

Hi guys!

I'm trying to set up this kit to remove https://github.com/mvaragnat/botkit-express-demo from my bot.

Once I cloned, installed dependencies and added my Slack app details, the bot sends me the I am a bot that has just joined your team message when the Oauth was successfully, but it never changes it states to on so I can't send any command. Also, it doesn't run if I don't remove the .data/db folder before running it.

Not sure if I'm doing something wrong or there is any configuration that I'm missing.

Thanks in advance!

@davidvexel
Copy link
Author

davidvexel commented Feb 2, 2018

This is the last debug message I get

debug: Got response null {"ok":true,"channel":"D52343234","ts":"1234323432343","message":{"type":"message","user":"U23423434","text":"You must now \/invite me to a channel so that I can be of use!","bot_id":"B5ACE7CH1","ts":"1234323432343"}}

@benbrown
Copy link
Contributor

benbrown commented Feb 2, 2018

@davidvexel you should use the much more modern starting point in botkit-starter-slack!

https://github.com/howdyai/botkit-starter-slack

OR, do:

npm install -g botkit
botkit new --platform slack

@benbrown
Copy link
Contributor

benbrown commented Feb 2, 2018

Wait, duh, I misread your message! Apologies.

The online status (the green dot next to username) for bots that use Slack's "events API" is controlled inside the api.slack.com site, under teh bot user section. Look for the option that says "always appear online."

Regardless, if properly configured with events API, you should be able to send and receive messages with the bot whether it appears online or not.

@davidvexel
Copy link
Author

Hi @benbrown,

Yeah the app config in Slack looks good, it works fine if I use the same app with a different project, I guess could be something in the code...

But I'll try this first

npm install -g botkit
botkit new --platform slack

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants