GithubHelp home page GithubHelp logo

zachandrews98 / groupmebot Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 96 KB

A bot that can interact with users in a groupme.

License: MIT License

Python 100.00%
groupme bot groupme-api chatterbot groupyapi python

groupmebot's Introduction

GroupMe Bot

About

Creates and runs a bot from the terminal for the GroupMe app. Uses Groupy to interface with GroupMe's API. Can post and read messages from the terminal. Will analyze any message using the '@' symbol and the name of the bot in the group. The bot can currently tell the time, weather, and create and keep track of events as well as reminders for the group. These are kept in files under .events/ or .reminders/ respectively. There is also a basic chatbot implementation that uses the ChatterBot library for basic back and forth conversation.

Startup

First clone the repository to your local machine. In a terminal execute pip3 install -r requirements.txt to download all required packages. Once all packages have downloaded, run python3 Main.py to begin running the program. On startup a config.ini file will be generated and you will be prompted to enter a GroupMe API key. This key is INCREDIBLY important and should not be shared with ANYONE, the program will also not function without this. If you would like current weather capabilities you will also have to get a key for OpenWeatherMap(OWM) and put that in the configuration file as well. Finally you will have to give a name for your bot and the group for your bot to monitor. This group must exist and you should at least initially be a member of since the group will be accessed using your GroupMe API key.

Capabilities

A list of possible commands can be viewed by simply directing a message saying "help" at the bot.

The bot can post responses to commands given in the group chat, if the message is directed to the bot. The bot will not look at any chats that do not directly mention it. It can also tell the time and weather in a given area by directing 'time' or 'weather' in a message at the bot. For events and reminders the command scheme is a little more complicated. In the creation and deletion processes a ':' is used to denote the end of the command and the beginning of the parameters. The parameters differ depending on if an event or reminder is being created, but should be separated by a ','. To view events and reminders that have been created simply direct the message list <events/reminders> at the bot. Everyday at 8:30 AM, the bot posts a message detailing all reminders and events for that day. Also at this time events are checked to see if they have already occurred. If they have, they are deleted from the master list of events.

Create Event Parameters

The structure of the parameters should be: <date>(m/d/y), <event name>, <event description>. Each of these is fairly self explanatory. Date is the date of the event, event name is the name of the event and should be unique to each event, and event description is the description of the event. This can include where and when the event is occurring and what will be happening at said event.

Create Reminder Parameters

The structure of the parameters should be: <day of the week>, <reminder name>, <description>. This system is set up for weekly reminders and as such is associated with a day of the week instead of a date. As such the day should be given as either a standard abbreviation or the fully written out day of the week. The name of the reminder should be given next, followed by a description of what is happening. Multiple reminders can be made for a single day of the week, but each reminder should have a unique name as to avoid any confusion in the deletion process.

Tests

Currently there is only one test written which checks to ensure that flake8 is followed for all python3 code. To run this and any future tests use the command pytest tests, which will run the tests and then output if they all pass or which ones fail.

Current Bugs

For any bugs found, please raise an issue in the Issue Tracker.

Credit

This project uses both Groupy and ChatterBot for core functions. I take no credit for any and all work done on those projects. pyowm is used for current weather functionality.

License

This project is lincensed under the MIT Lincense

groupmebot's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

groupmebot's Issues

Fix command structure

-if a command keyword is in another command and comes before it in the if statements, will do that command before the actual command

Review Checklist

  • Project Name and Description

  • How to Build and Run the Project

  • How to Test the Application

  • Software Tools Used

  • Tangible Results

  • Travis CI Integration

  • Use of Github Flow

  • Use of Standard Directory Conventions

  • License

New feature on ReadMe

Right now, whenever the group name doesn't already exist when setting up the program. There is an error. So, tell the users in the ReadMe to create a group before running the program

Command in bot output

Zachary Andrews: @test list events

test:
Events Today:
-- 10/18/2018, this is a test, i am testing eventsEvents:
-- 10/18/2018, this is a test, i am testing events

The events keyword is in the event output and causes the bot to print it out 2 times

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.