GithubHelp home page GithubHelp logo

vacovsky / trebot Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 4.0 12.44 MB

Jeopardy bot plugin for go-chat-bot (https://github.com/go-chat-bot/bot)

License: MIT License

Go 100.00%
go-chat-bot slack trivia jeopardy jservice chat bot golang plugin

trebot's Introduction

Trebot - trivia plugin

Circle CI

Usage / Bot Interaction

Get a new question

!trivia new

Answer a question

!trivia answer pineapple
or
pineapple

View the Scoreboard

!trivia scoreboard
+------+------------------+--------+---------+-------+-----+----------+
| RANK |       USER       | SCORE  | CORRECT | WRONG | NEW | ACCURACY |
+------+------------------+--------+---------+-------+-----+----------+
|    1 | casey            | 225300 |     164 |   122 |  15 |    0.573 |
|    2 | viki             |  63800 |     111 |   234 |  42 |    0.322 |
|    3 | vacoj            |  60700 |      40 |    65 |  16 |    0.381 |
|    4 | bologna          |  58000 |      61 |   128 |  50 |    0.323 |
|    5 | josh             |  55800 |      53 |   310 |  45 |    0.146 |
|    6 | krem             |  38200 |      73 |   196 |  33 |    0.271 |
|    7 | joey             |  18000 |       2 |     2 |   0 |    0.500 |
|    8 | k-w              |   1000 |       0 |     0 |   0 |    0.000 |
+------+------------------+--------+---------+-------+-----+----------+

View "About" information

!trivia about

Setup / Installation

Stand Alone

go get -u "github.com/vacoj/trebot"
go get -u "github.com/vacoj/trebot/trivia"
go get -u "github.com/go-chat-bot/bot/slack"
# Set your bot token for slack as an environment variable called "trebot"
export trebot="xxxx-yourslackbotkey"
trebot

As a plugin for an existing bot

Install plugin

go get -u "github.com/vacoj/trebot/trivia"
#Set your bot token for slack as an environment variable called "trebot"
export TREBOT_KEY="xxxx-yourslackbotkey"

Update your bot main to include the plugin

package main

import (
	"os"

	_ "github.com/vacoj/trebot/trivia"
	"github.com/go-chat-bot/bot/slack"
)

func main() {
	slack.Run(os.Getenv("TREBOT_KEY"))
}

Contributing

Pull requests are encouraged. Please submit unit tests with any submitted patch. Also, please make it clear what your patch does in branch and commit messages.

  1. Fork the repository
  2. Create your feature branch git checkout -b change-to-thing
  3. Commit your changes git commit -am 'changes to the thing'
  4. Push to the branch git push origin change-to-thing
  5. Create new pull request
  6. Be patient

trebot's People

Contributors

dylanm312 avatar gengafoot avatar vacovsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

trebot's Issues

Answers with apostrophes bomb

casey [2:03 PM]
!trivia answer What's Happening Now

trebotAPP [2:03 PM]
Error parsing arguments: invalid command line string

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.