- Notifications
You must be signed in to change notification settings - Fork14
🤖 A powerful GroupMe chatbot for Yale University.
License
ErikBoesen/Yalebot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A GroupMe chatbot for Yale University.
To add this bot to your own server, gohere!
NOTE: This bot was formerly available for Discord and Facebook Messenger, but due to lack of use that functionality has been removed.
I would not recommend attempting to reuse this bot's code for your own. While I've licensed it under the GPL and invite you to borrow code at will under proper attribution, this bot is extremely complex, with a very large number of extraneous features that you probably don't want. If you want to use this bot yourself, it's quite easy toadd it to your own group. If you're interested in creating your own GroupMe bot from scratch, start withthis tutorial. If you need practice in Python, I recommendCodecademy's course.
Cards Against Humanity was removed from this bot in May 2019, in favor of moving that functionality into Bot Against Humanity, a new bot without Yale baggage that can be used by all. Add ithere!(GitHub)
Yalebot uses theGroupMe Bots API for message exchange, hosting a Flask server which listens for incoming webhooks and decides on a response.
In order to keep code clean and maintainable, most bot systems are compartmentalized under the subdirectorymodules/
. Each contains a class that implements a methodresponse
taking as parameters the query (message text following command invocation) and raw message data from GroupMe. These modules inherit from theModule
class. Class variablesDESCRIPTION
andARGC
should be assigned, giving a summary of component functions and the number of required arguments respectively. Each module must be instantiated inbot.py
.
Static text responses are present in thestatic_commands
dictionary inbot.py
.
Yalebot runs best onHeroku.
To run Yalebot, you must provide your own API key for certain modules to function properly:
heroku config:set GROUPME_ACCESS_TOKEN=abcdef12345# obtained from dev.groupme.com
After that, simply push the code via Heroku CLI and the bot will launch.
Yalebot was created byErik Boesen.