Coder Social home page Coder Social logo

hoix / yalebot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erikboesen/yalebot

0.0 0.0 0.0 19.21 MB

:robot: A powerful GroupMe chatbot for Yale University.

Home Page: https://yalebot.herokuapp.com

License: GNU General Public License v3.0

Python 95.67% Shell 0.19% HTML 2.11% CSS 2.03%

yalebot's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.