A simple GroupMe bot that reacts to messages sent within a group.
Be sure to log in to Heroku, using your Heroku credentials, then click the link below.
You should be taken to a page that looks like this:
Optionally, you can give your app a name, or instead leave it blank and let Heroku name it for you (you can change it later).
Use your GroupMe credentials to log into the developer site.
Once you have successfully logged in, go to https://dev.groupme.com/bots/new
Fill out the form to create your new bot:
Go here to view all of your bots: https://dev.groupme.com/bots
Click on the one you just created.
On your Bot's page, copy the Bot ID
Go here to see all of your Heroku apps and select the one you just created before:
On your app page, click settings in the top navigation:
On your app's setting page, find the Config Vars section and click the Reveal Config Vars button:
Then click edit:
Fill out the form to add an environment variable to your app:
Go to GroupMe and type "/ping" in the group where your bot lives to see it in action.
Within terminal, change directory to the location where you would like the files to live, then run this command:
heroku git:clone -a YOUR_APP_NAME_HERE
And then change directory into the new folder
You will need to set the
BOT_ID environment variable so that your bot will know where to send its messages.
If you don't know what your Bot ID is, please refer back to this section, where it is explained how to retrieve it.
In your terminal, run
You may wish to add this to a file that runs each time you start your shell, such as
For Heroku, run:
heroku config:set BOT_ID=INSERT_YOUR_BOT_ID_HERE
To test your bot locally, open terminal and install dependencies:
pip3 install -r requirements.txt
Then start a local server.
FLASK_APP=bot.py flask run
or use gunicorn to imitate the production Heroku environment:
Then navigate to
http://localhost:8000 in a browser.