GithubHelp home page GithubHelp logo

tanmayrajani / cinephi1e Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 2.0 840 KB

A Messenger chatbot that suggests movies, provides plot summary.. things like that

Home Page: https://m.me/cinephi1e

License: MIT License

JavaScript 100.00%
messenger messenger-chatbot nodejs

cinephi1e's Introduction

Hi there ๐Ÿ‘‹

Tanmay's github stats

tanmayrajani

profile for tanmay at Stack Overflow, Q&A for professional and enthusiast programmers

cinephi1e's People

Contributors

bbackspace avatar beingadityak avatar tanmayrajani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cinephi1e's Issues

Message sequence not in order for #plot

In case of a long (3-4 sentence) summary of given movie, the sentences received by the end user are often not in order hence it doesn't make much sense.

Send messages sequentially using promises or async or something similar to achieve this. Recommended is promises which is inherent and not requiring any libraries.

Movie trailers

Possible tags:

sneakpeek

trailer

Can use Google search or YouTube search API for getting the trailer link?

#guessthemovie

A mini game that lets users guess which movie a said quote is from.
Users start the game with "#guessthemovie" and the bot sends a quote. The bot answers yes/no until the users guesses the movie name correctly. Can allow for phonetic deviations and missing words like 'the', but not major deviations from the name.

Help if mis-typed

Help if mis-typed

Users either forget the hash or type something gibberish. If hash is forgotten, then tell them "you mean #meta ?" (if "meta" is typed)

And if gibberish is typed, the current message shall be given as well as a help GIF shall also be sent

Add release date

Users might be interested in the release date of a movie. We can show it in the plot summary or possibly add a #meta tag to show other metadata too.

Fails when there are unescaped parenthesis "(500) days of summer (2009)"

It stops responding after getting this error. Following is the error log:

2017-04-23T07:04:07.425346+00:00 app[web.1]: Msg text: "(500) days of summer (2009)"
2017-04-23T06:57:47.234810+00:00 app[web.1]: SyntaxError: Invalid regular expression: /^(/: Unterminated group
2017-04-23T06:57:47.234812+00:00 app[web.1]:     at new RegExp (native)
2017-04-23T06:57:47.234813+00:00 app[web.1]:     at SoundEx.process (/app/node_modules/natural/lib/natural/phonetics/sou
ndex.js:72:39)
2017-04-23T06:57:47.234813+00:00 app[web.1]:     at compare (/app/node_modules/natural/lib/natural/phonetics/phonetic.js
:29:21)
2017-04-23T06:57:47.234814+00:00 app[web.1]:     at changeTextNatural (/app/index.js:135:58)
2017-04-23T06:57:47.234814+00:00 app[web.1]:     at /app/index.js:431:41
2017-04-23T06:57:47.234815+00:00 app[web.1]:     at Layer.handle [as handle_request] (/app/node_modules/express/lib/rout
er/layer.js:95:5)
2017-04-23T06:57:47.234816+00:00 app[web.1]:     at next (/app/node_modules/express/lib/router/route.js:137:13)
2017-04-23T06:57:47.234816+00:00 app[web.1]:     at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)

2017-04-23T06:57:47.234817+00:00 app[web.1]:     at Layer.handle [as handle_request] (/app/node_modules/express/lib/rout
er/layer.js:95:5)
2017-04-23T06:57:47.234818+00:00 app[web.1]:     at /app/node_modules/express/lib/router/index.js:281:22

Handle exceptions due to bad input gracefully

Currently the code is written in such a way that any bad input that causes a regex error or any other exception will bubble up and the server will go down.
A catch-all block should be added to the request handler to log an error and reply with an appropriate message. This will avoid server crashes due to bad input and present a better user experience in general.

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.