Git Product home page Git Product logo

osdc-bot's Introduction

OSDC Bot

travis status Join the chat at https://gitter.im/osdc/Hackers

This bot lives at https://gitter.im/osdc/Hackers

Installation:

$ npm install
$ pip install -r requirements.txt

Running:

$ python server.py
$ TEST=true node chatbot.js # Run locally with I/O to stdin and stdout.

Testing:

Run code linter: npm run-script lint

Run frontend tests: npm run-script frontend_tests

osdc-bot's People

Contributors

526avijitgupta avatar abhishekgupta5 avatar priyansh1161 avatar ryzokuken avatar wimpykid26 avatar yash17agrawal avatar yashmehrotra avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

osdc-bot's Issues

Integrate Insulter

Example Usage:

@osdc-bot insult <name>

This returns an insult joke with name as it's subject.

Implement karma system for bot

@<mention_name> ++
@<mention_name> --

Both the above should work and increase/decrease the value of score of the mentioned person.

Note for anyone tackling this issue: The score should be persistent and must not be reset to zero on deployment (re-running of the node chatbot.js script)!

Create separate room for testing purposes

The reasons for having a separate Gitter room for testing:

  1. Manual testing - this room can be used to test out local changes freely without having to worry about the main chat being cluttered.
  2. Automated testing (A minor possibility, needs further investigation) - The current tests that are being implemented in #5 are just unit tests. It would a great addition if we could add integration tests for the bot, for which this room can be used as a playground!

Handle Errors caused by using wrong command.

For eg. @osdc-bot karma is the wrong command.

Below is the traceback. This causes the app to exit.

[INFO] In loop karma
/home/osdc-bot/chatbot.js:57
    } else if (msgBody[2].trim() === "++") {
                         ^

TypeError: Cannot read property 'trim' of undefined
    at getBotReply (/home/osdc-bot/chatbot.js:57:26)
    at Request._callback (/home/osdc-bot/api.js:32:9)
    at Request.self.callback (/home/osdc-bot/node_modules/request/request.js:187:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/home/osdc-bot/node_modules/request/request.js:1044:10)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/home/osdc-bot/node_modules/request/request.js:965:12)
    at emitNone (events.js:72:2

Help Usage

Currently the help doesn't show how to use the commands.
Example: it may be like this:

wiki <term>  
location <city>   
joke

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.