##A Slack Chat Bot
This is a bot for use with the Slack Chat webclient. It uses Slack's Web API format and is written in Python 3.
More info on Slack bots can be found here.
I call this "Chat Dragon", but it can easily be renamed within the file dragon.py (which can also be renamed).
The bot's commands can be found here
This is a standalone program and as such it is easy to install.
Remember that you must be running (as) Python 3.4 or later.
- Download or clone the repository to your target directory
- Update the bot file ("dragon.py") with the necessary information provided to you by Slack
- To generate your CLIENT_ID and CLIENT_SECRET, you will need to register your bot here
- Assign the bot a username in the provided field.
- Make sure to include the necessary information such as Team and your username. The bot REQUIRES this info to function properly.
- Update auth/token.txt with your API token (make sure the file only contains one line)
- Once you have made sure that all necessary info has been added to the bot, activate a virtual environment.
- As root, install the required dependencies with
pip3 install -r requirements.txt --allow-all-external
- Run the bot!
If the bot is working properly, after starting it will begin to display scrolling data output, beginning with a request/response header.
- Follow steps 1-3 above.
- Run either the command prompt (cmd.exe) or Powershell as an Administrator
cd
to the repository folder.- Run the command
pip install -r requirements.txt --allow-all-external
- Run the bot, either by running it directly or from within the Python Shell.
If the bot is working properly, after starting it will begin to display scrolling data output, beginning with a request/response header.
This repository contains everything necessary for the bot to be run on Heroku.
Follow the normal Python deployment procedure to deploy and run the bot. Please note that if you rename the main bot file ("dragon.py") you must also update the Procfile accordingly.
I recommend using the Papertrail addon to track the output of the bot.