Giter Site home page Giter Site logo

gesteves / trebekbot Goto Github PK

View Code? Open in Web Editor NEW
158.0 5.0 102.0 610 KB

An addictive Jeopardy! bot for Slack, powered by the jService API. Sets up a perpetual game of Jeopardy! in your Slack channels.

Home Page: https://www.trebekbot.com

Ruby 85.57% Procfile 0.08% Dockerfile 0.15% JavaScript 0.63% HTML 13.26% CSS 0.15% Shell 0.16%
slack heroku bot ruby rails

trebekbot's Introduction

trebekbot

A Jeopardy! bot for Slack, powered by the jService API. Sets up a perpetual game of Jeopardy! in your Slack channels.

Screen Shot 2022-04-06 at 11 00 17 AM

Installation

Unfortunately, jService.io, which is the third-party service from which Trebekbot sourced the questions and answers, has shut down permanently. As such, Trebekbot no longer works and cannot be installed. Thanks for playing!

Usage

After installing the bot, invite it into one or more channels with /invite @trebekbot. Pro-tip: Create a new channel (for example, #jeopardy) just for this purpose, to avoid creating a huge distraction in other channels.

After that, simply mentioning "@trebekbot" will start a new game in the current channel.

You can also say:

  • "@trebekbot my score" to see your current score
  • "@trebekbot leaderboard" or "@trebekbot scoreboard" to see the top scores
  • "@trebekbot help" to see a list of commands

trebekbot's People

Contributors

cmatta avatar dependabot[bot] avatar dodechotomy avatar gesteves avatar quiqueg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

trebekbot's Issues

Explanations in parentheses cause correct answers to be marked wrong

Some answers have explanations in parentheses, that Trebek would presumably read out loud on the show. In this version, though, it causes correct answers to be judged wrong because our answers are different enough from the given answer. It would be nice if we could ignore explanations in the parentheses when deciding whether an answer is correct.

Example:
screenshot 2015-08-17 13 42 12

leaderboard issues

Thanks for building this, my coworkers and I are wasting copious amounts of time with it and it's wonderful.

One problem we're having:

trebek show me the leaderboard was working for some time but suddenly stopped responding.

Logs show that the code is making it into get_score_leaders :

[LOG] Leaderboard: [{:user_id=>"U02G0LUHC", :score=>-1500}, {:user_id=>"USLACKBOT", :score=>-500}, {:user_id=>"U02JD9S94", :score=>-2300}, {:user_id=>"U02K21CP2", :score=>1000}, {:user_id=>"U02PPKV7H", :score=>0}, {:user_id=>"U02GQS084", :score=>-1200}, {:user_id=>" U02G0LUHC", :score=>-700}, {:user_id=>" U02GQS084", :score=>-800}, {:user_id=>"U02PQ4KM8", :score=>-1000}, {:user_id=>"U02FU7UQT", :score=>2800}]

But there's an error immediately following the above:
[ERROR] undefined method []' for nil:NilClass`

Flushing the Redis memory fixed it for awhile, but it started happening again after a few rounds of play.

Suggestions?

ay bruh update the ruby please i am really trying to get my trebek on

please :(

-----> Ruby app detected -----> Compiling Ruby/Rack Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-2.2.0.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3. Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-2.2.0.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3. ! ! An error occurred while installing ruby-2.2.0 ! ! This version of Ruby is not available on Heroku-18. The minimum supported version ! of Ruby on the Heroku-18 stack can found at: ! ! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes ! ! Push rejected, failed to compile Ruby app. ! Push failed

Question Error

The category is it's greek myth to me for $1,000: This god is a brother of Zeus

I answered Hades and was told it's wrong answer. The bot was looking for Poseidon but Hades is also Zeus' brother.

Heroku install fails while installing ruby-2.2.0

-----> Ruby app detected
-----> Compiling Ruby/Rack
!
! An error occurred while installing ruby-2.2.0
!
! Heroku recommends you use the latest supported Ruby version listed here:
! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
!
! For more information on syntax for declaring a Ruby version see:
! https://devcenter.heroku.com/articles/ruby-versions
!
!
! Debug InformationCommand: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-16/ruby-2.2.0.tgz -s -o - | tar zxf - ' failed unexpectedly:
!
! gzip: stdin: unexpected end of file
! tar: Child returned status 1
! tar: Error is not recoverable: exiting now
!
! Push rejected, failed to compile Ruby app.
! Push failed

Support for answers in the form of "When is..."

trebekbot: "The category is answers that start with "feb" for $200: `Buy me a drink & I'll be your sweetie on Valentine's Day, this date"

Me: "trebekbot when is February 14?"

trebekbot: "That is correct, Jared, but responses have to be in the form of a question. Your total score is $146,300."

Sean Connery

Hi, thanks for the simple steps to deploy, I'm new to this things. Why does the bot not recognize the different people and takes us all as Sean Connery? I don't know if there's any info regarding my setup that would help you, I deployed using heroku.
Thanks!!!

You have 30 seconds! (not really)

"Trebek jeopardy me" starts the 30 second timer, but it may take several seconds till a question is posted by the trebek bot.

The timer should start when a question is posted maybe?

Not asking questions. Only getting in-between banter

Trebekbot isn't actually proposing any questions for us to answer. Just a constant loop of what you see below. Hoping for any guidance you can provide!

Welcome back to Slack Jeopardy. Once again, I'm going to recommend that our viewers watch something else.

What a ride it has been, but boy, oh boy, these Slack users did not know the right answers to any of the questions.

Good for you. Well, as always, three perfectly good charities have been deprived of money, here on Slack Jeopardy. I'm trebekbot, and all of you should be ashamed of yourselves! Good night!

"Time's up" message

There should be a "Time’s up" message after the 45 seconds has elapsed, informing participants that they should ask for a new question.

Support number to word conversion

Some questions can result in false negatives if the answer is a number and a player types the wrong version of the number. Ideally "what is 10" would work if the json is "what is ten".

There are libraries that would make this a little easier, or you could roll your own simplified version.

Transition between questions and time up function

So, I wonder if we can collaborate on changing the script a little bit so that a new question is populated on a certain schedule ever if a user hasn't called for it, and for it to express that time to answer the question has expired.

"Invalid token" message not clear if referring to webhook or api token

  1. Followed Installation Steps 1 & 2 (Set up a Slack outgoing webhook & grabbed the outgoing webhook token.)
  2. Followed Installation Step3, manually. Configured .env.example with the following token values:
    OUTGOING_WEBHOOK_TOKEN=ZFi1We2...b
    .
    API_TOKEN=xoxb-17...
  3. Deployed on Heroku & Heroku logs say:
    [LOG] {"token"=>"ZFi1We2...b
  4. In Slack, typed:
    trebekbot jeopardy me

Expected: OUTGOING_WEBHOOK_TOKEN is Heroku "token", so everything should work. (Fun with trebekbot.)

Actual Alex responds with:
trebekbot BOT [12:51 AM]
Invalid token

This message is for the outgoing webhook token (app.rb lines 43-44), right? And not the api token?

Thanks for any clarification/help, here!
Julee

Audio DD

I had question with this tag. I think that program should filter them because these are questions with audio files.

Sean Connery Issue in 2020

Hello!

Can you let me know how to solve the Sean Connery issue with not inputting the correct API token with the current Slack set up? Our team loves the bot, but we're all Sean Connery and that's no fun. :)

Thanks!

Question vs. answer

The response when correct is 'that is the correct answer', it is in fact the correct question. I am happy to create a PR but the question I have is. Does anyone give a shit?

I sound like an asshole, but I wanted to ask.

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.