The slackbot is built with Bolt framework in python. You have to follow the getting started page to get Donkeybot up and running on your slack workspace:
- Getting Started : https://api.slack.com/start/building/bolt-python
For adding your app credentials like the SLACK_BOT_TOKEN and the SLACK_SIGNING_SECRET
create a .env
file on your repository and, while making sure no extra spaces exist, add:
- SLACK_TOKEN=<YOUR_TOKEN>
- SLACK_SIGNING_SECRET=<YOUR_SECRET>
- PORT=<SERVER_PORT>
Additionally, make sure to download ngrok, which is used for development server, as suggested in Bolt's Getting Started
documentation.
- Event subscriptions:
app_mention
- Scopes:
app_mentions:read
-channels:history
-chat:write
-reactions:write
-
Make sure all you've added the slackbot in your workspace
-
That you've added all the correct event subscriptions, scopes, SLACK_TOKEN and SLACK_SIGNING_SECRET.
-
Open the virtual environment you've setup:
$ source venv/bin/activate
-
Run the local server:
$ python api/slackbot.py
-
Go to the ngrok installation folder and:
$ ./ngrok http <PORT>
-
Link request URLs with app.
- Copy the forwarding address from ngrok shown above.
- Go to the
Interactivity & Shortcuts
andEvent Subscriptions
sections of theapi.slack.com/apps/<your_donkeybot_app>
website. - Paste the forwarding address and add the
/slack/events
endpoint.
-
Go to the slack channel you've added Donkeybot at and ask with:
@Donkeybot <QUESTION>