A Slack bot for getting movie information while communicating using Slack
- Python 2 or 3
- pip and virtualenv
- The Python slackclient
- A Slack account with an API token
First, fork the main repo. Then clone the forked repository on your local machine
git clone https://github.com/YourName/FilmyBot.git
Navigate to the directory and create a new virtual environment
virtualenv botvenv
Activate the virtual environment
source botvenv/bin/activate
Then install the Python slackclient library with the pip command
sudo pip install slackclient
The next step is to create a bot user for our Slack team and obtain the API access token.
Create a new bot user by following the create a new bot user instructions on the Bot Users pages
Copy the bot API access token and export is an environment variable named SLACK_BOT_TOKEN
export SLACK_BOT_TOKEN='your Slack API token'
Run the get_botid.py script to get the bot ID. In the script, change the value of 'BOT_NAME' to the name of the bot that you created.
python get_botid.py
The id returned by this script is your bot ID which you'll be using in the filmyBot.py script to start the Slack bot.
After setting the bot id in the filmyBot.py script, run the following
python filmyBot.py
Invite the Filmybot in your Slack channel
Run the Filmybot as follows