Skip to content

ErikBoesen/Yalebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yalebot

Build Status

A GroupMe chatbot for Yale University.

Screenshot

To add this bot to your own server, go here!

NOTE: This bot was formerly available for Discord and Facebook Messenger, but due to lack of use that functionality has been removed.

Some notes

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 to add it to your own group. If you're interested in creating your own GroupMe bot from scratch, start with this tutorial. If you need practice in Python, I recommend Codecademy'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 it here! (GitHub)

Design

Yalebot uses the GroupMe Bots API for message exchange, hosting a Flask server which listens for incoming webhooks and decides on a response.

Module structure

In order to keep code clean and maintainable, most bot systems are compartmentalized under the subdirectory modules/. Each contains a class that implements a method response taking as parameters the query (message text following command invocation) and raw message data from GroupMe. These modules inherit from the Module class. Class variables DESCRIPTION and ARGC should be assigned, giving a summary of component functions and the number of required arguments respectively. Each module must be instantiated in bot.py.

Static text responses are present in the static_commands dictionary in bot.py.

Platform

Yalebot runs best on Heroku.

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.

Authorship

Yalebot was created by Erik Boesen.

License

GPL

About

🤖 A powerful GroupMe chatbot for Yale University.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published