- Forked and inspired by pybites/slackbot.
- Code for article How to Build a Simple Slack Bot.
- Python 3.6+ (not tested on lower versions) with PIP
- Docker with Docker Compose
- Clone the repository (or fork and clone).
- Copy or move secrets.yml.sample to secrets.yml.
- Required:
slackbot.name
,slackbot.token
- Optional:
slackbot.id
- Create a new bot user
- Store the bot's username in secrets.yml as
slackbot.name
- Store the API Token in secrets.yml as
slackbot.token
- Note:
slackbot.id
is optional and will be determined at instantiation of NewsSlackBot
- Required:
consumer.key
,consumer.secret
,access.token
,access.token_secret
- Create a new Twitter app
- Look for Manage the keys and access tokens near the Consumer Key (API Keys) and make sure the Consumer and Access keys are generated.
- Store the Consumer Key in secrets.yml as
twitter.consumer.key
- Store the Consumer Secret in secrets.yml as
twitter.consumer.sercet
- Store the Access Token in secrets.yml as
twitter.access.token
- Store the Access Token Secret in secrets.yml as
twitter.access.token_secret
-
Once you have finished secrets.yml, then we just build the image.
docker-compose build
Not supported
-
Assuming you have Python 3 installed, let's get the environment setup:
pip3 install -r requirements.txt
- Be sure to setup the environment in Install first.
-
Launch the container:
docker-compose up -d
Not supported
-
Run in the foreground:
./run.sh
OR background:
./run.sh &