yincrash / hubot-trivia-game Goto Github PK
View Code? Open in Web Editor NEWTrivia plugin for Hubot
License: MIT License
Trivia plugin for Hubot
License: MIT License
When the bot comes online we issue
!trivia
you get this error the first time always.
'''
[Mon Nov 10 2014 10:54:35 GMT-0800 (PST)] ERROR ReferenceError: robot is not defined
at Game.askQuestion (/PATHANDSTUFF//hipbot/node_modules/hubot-trivia-game/src/trivia-game.coffee:42:7, :26:9)
at TextListener.callback (/PATHANDSTUFF//hipbot/node_modules/hubot-trivia-game/src/trivia-game.coffee:91:5, :86:19)
at TextListener.Listener.call (/PATHANDSTUFF//hipbot/node_modules/hubot/src/listener.coffee:27:7, :23:14)
at Robot.receive (/PATHANDSTUFF//hipbot/node_modules/hubot/src/robot.coffee:197:9, :142:33)
at HipChat.Adapter.receive (/PATHANDSTUFF//hipbot/node_modules/hubot/src/adapter.coffee:66:5, :47:25)
at /PATHANDSTUFF//hipbot/node_modules/hubot-hipchat/src/hipchat.js:206:24
at invokeCallback (/PATHANDSTUFF//hipbot/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:161:15)
at Object. (/PATHANDSTUFF//hipbot/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:193:9)
at /PATHANDSTUFF//hipbot/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:13:16
at process._tickCallback (node.js:419:13)
'''
Second time you issue the command it works.
Attempting to answer with !a or !answer you get the following error
[Mon Nov 10 2014 10:54:50 GMT-0800 (PST)] ERROR TypeError: Cannot call method 'toLowerCase' of undefined
at Game.answerQuestion (/PATHANDSTUFF//hipbot/node_modules/hubot-trivia-game/src/trivia-game.coffee:63:10, :48:67)
at TextListener.callback (/PATHANDSTUFF//hipbot/node_modules/hubot-trivia-game/src/trivia-game.coffee:97:5, :92:19)
at TextListener.Listener.call (/PATHANDSTUFF//hipbot/node_modules/hubot/src/listener.coffee:27:7, :23:14)
at Robot.receive (/PATHANDSTUFF//hipbot/node_modules/hubot/src/robot.coffee:197:9, :142:33)
at HipChat.Adapter.receive (/PATHANDSTUFF//hipbot/node_modules/hubot/src/adapter.coffee:66:5, :47:25)
at /PATHANDSTUFF//hipbot/node_modules/hubot-hipchat/src/hipchat.js:206:24
at invokeCallback (/PATHANDSTUFF//hipbot/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:161:15)
at Object. (/PATHANDSTUFF//hipbot/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:193:9)
at /PATHANDSTUFF//hipbot/node_modules/hubot-hipchat/node_modules/rsvp/node/rsvp.js:13:16
at process._tickCallback (node.js:419:13)
Your help is appreciated as we really want trivia:P
Trivia Game encounters an error when a user attempts to answer a question. This has been happening since yesterday (March 6th, 2018), around midday. Here is an example of the log message:
[Wed Mar 07 2018 12:08:06 GMT-0600 (CST)] ERROR undefined
Trivia Game responds to answers by awarding points if the answer is correct, or by telling the user that the answer is incorrect.
v1.0.8
Slack
Jeopardy Questions file is downloaded from the following URL, and placed in res/questions.json
http://www.reddit.com/r/datasets/comments/1uyd0t/200000_jeopardy_questions_in_a_json_file
hubot-loaded-questions
installed and added to the external_scripts.json
file.ERROR undefined
in the logs.do it, yin
like after 30 seconds it just gives the answer and moves to the next question
something like "!t 30" would set a 30 second timer
have a toggle to make the next question appear after being answered
sometimes answers require 'a' or 'the'. Don't require articles in the guesses.
For example, fixing spelling errors. Should corrections be rewritten to the question set json, or maybe make a corrections.json
?
For answers that are names (how to figure out names?), allow guesses of just the last name.
The score is always $0 even after the user answers a question correctly. Any idea what I'm doing wrong ?
HipChat Bot 10:55 AM
Answer with !a or !answer
For $1600 in the category of BACK IN 1906:
'In 1906 there were 90 of these; nearly two-thirds of them were Republican'
Tom Alexander 10:55 AM
!a senators
HipChat Bot 10:55 AM
@TomA YOU ARE CORRECT!!1!!!111!! The answer is senators
@TomA Score: 1600
Ravikiran Janardhana 10:55 AM
!score Tom Alexander
HipChat Bot 10:55 AM
Tom Alexander - $0
Using on slack.
I get 11 messages from hubot each time I use !scores. It looks like in the first message, it lists the first member of my Slack, then in the second, it lists the first and second member, then in the third it lists the first second and third member, and so on until there are 11 messages with the final message showing everyone and the score. What's up with that?
Causes hubot to fail at startup with the following error:
ERROR Unable to load /home/****/*****/node_modules/hubot-trivia-game/src/trivia-game: SyntaxError: Unexpected token , in JSON at position 109 at JSON.parse (:null:null)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.