Giter Club home page Giter Club logo

slack-pongbot's Introduction

DEPRECATED

This repo was never meant to be public, I just happened to throw code together in a span of a day to have something fun. Unfortunately, the code quality is terrible and not fit for open source contributions.

I highly recommend checking out one of these alternatives:

Open source alternatives

Hosted alternatives

Pongbot

Slack Bot for Ping Pong tracking.

Build Status

Deploy to Heroku

Installation

Deploy with your preferred solution, eg. with Heroku.

Administrative commands require the ADMIN_SECRET environment to be set.

heroku config:add ADMIN_SECRET=secret

Visit https://yourteamname.slack.com/services/new and choose "Outgoing WebHooks." Choose which channels you would like pongbot active in, a trigger word with pongbot, and the url that you deployed to.

Using Pongbot from Slack

Make sure you're registered with pongbot.

pongbot register

Challenge someone, or a team.

Singles:

pongbot challenge singles <opponent's name>

Doubles:

pongbot challenge doubles <teammate's name> against <opponent_1> <opponent_2>

Let them run this, to accept the challenge. Only one other person (teammate or opponent) needs to accept to confirm the challenge.

pongbot accept

If you can't play now, pongbot decline.

Game On!

Record the match. Only the person/team that lost can record, it'll automatically change everyone's scores/rankings.

pongbot lost

Other Commands

  • pongbot decline - Decline's any proposed match.
  • pongbot chicken - Chicken out of your own challenge before it is accepted, or out of an accepted challenge (as the challenger or challenged).
  • pongbot leaderboard <1-infinity> - Shows the top players, sorted by Elo.
  • pongbot rank <someone's name> - Gets that person's stats. If none given, it will return your own stats.
  • pongbot source - Get's Pongbot's Github repository.
  • pongbot reset <name> <secret> - Admin-only command that reset's a person's stats.
  • pongbot new_season <secret> - Admin-only command that reset's all stats and begins a new season.

API

See API Documentation.

License & Copyright

Copyright (c) 2014-2015, Andrew Vy and Contributors

ISC License, see LICENSE for details.

slack-pongbot's People

Contributors

101100 avatar andrewvy avatar dblock avatar geoffrey avatar megatron-me-uk avatar mihar avatar roryokane 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

slack-pongbot's Issues

ADMIN_SECRET is not enough to make pongbot admin operations secure

The problem is that the secret needs to be typed, so everyone gets to see it.

I think the only way to fix this is to introduce a real admin role and have the first registered user become an admin. Or is there a way to tell Pongbot an admin command (a slash command?) without displaying it?

Challenge anyone

I'd like to be able to challenge anyone, not a specific user. Currently this "problem" is solved by begging.

screen shot 2015-04-21 at 4 13 12 pm

CORS for API calls

Have you thought about enabling cross-origin calls API calls at all?

I spent a little time tonight trying to use the Express CORS middleware, but for some reason kept failing. Have you thought about this at all, or do you have any suggestions? -- Thanks

feature request: "pongbot invite"

I admit it won't be used often once everyone in my company signs up, but it would be fun for new hires, etc. to get an invite

Sweet bot, btw!

Challenge state doesn't end

Someone issues a challenge and loser records. We receive confirmation from pongbot with "Match has been recorded, XXX defeated XXX."

However, neither of them can issue new challenge or be challenged again. Pongbot will say "Error: There's already an active challenge between XXX and XXX."

Is this a bug or is it intended that each player can only play once per "season"?

Thanks!

Running web view on heroku

I have pongbot successfully configured on heroku at this address. But, it's currently only showing up as raw json. I'm a little new to running apps on heroku, and I'm wondering what I need to do to get the web view to show up with all the player data.

What am I missing? Thanks for your help, and for building this. It's awesome.

Support challenging with @

You should be able to pongbot challenge singles @dblock, with or without the @ sign, so that the user gets a notification.

Change to Slack's Bot User API

https://api.slack.com/bot-users

Wow, this is new to me. Didn't realize this was added back in December!

I think this would be very interesting to look into and implement.
It would make installation so much more easier, allow better bot customization, and opens the Real Time Messaging API for extra fun/functionality.

Drop the "develop" branch.

@andrewvy I just almost confused myself with the develop branch again. It's now behind master. Why don't we just nuke it and not accept PRs that would make master unstable?

Write tests for the API or nuke it?

We also need to write API tests or nuke'em. Also good opportunity to review the vocabulary, rankings are really players and matches are really challenges. Maybe we should just call them that?

If we're going to be serious about an API, maybe it should have a Hypermedia layout.

Support renaming users

I was "db", then I had enough of notifications for every database problem and became "dblock". Now pongbot doesn't know me :(

Pongbot challenge not working

Hi there just setup your app with our Slack channel and get the following issue:

  • Successfully registered! Welcome to the system, thmsmtylr.
  • Successfully registered! Welcome to the system, jason.

"pongbot challenge single @jason"

  • Could not find a player with that name. Have they registered?

DB:

[{"_id":"54f9314191ee2a0300766f38","user_name":"thmsmtylr","wins":0,"losses":0,"elo":0,"tau":0,"__v":0},{"_id":"54f9317691ee2a0300766f39","user_name":"jason","wins":0,"losses":0,"elo":0,"tau":0,"__v":0}]

Everything looks to be functioning correctly but I can't seem to get the challenge feature to work. Anything I'm overlooking here?

Migrate to GIF API

It would be cool to not hardcode some starting GIFs and just fetch random ones off the internet. :)

Not sure if there's any good GIF search APIs out there. Imgur's looks pretty bland.

Expire challenges

Challenges should only live for a short period of time, if you challenge someone and they didn't reply within an hour, just expire it?

Auto-generate a challenge with a random person

[suggestion]
Hey guys, I was wondering there's anything built at the moment to automatically generate a challenge to any random person on slack on a given time. This would be nice to have!

Auto-correct player names

Too much productive time is wasted every day trying to type someone's name ;)

This could have been: Can't find a player with such a name, did you mean 'dblock'?

screen shot 2015-04-17 at 1 49 31 pm

Mention Pinpon in the README

We'd appreciate a mention of Pinpon in the deprecation notice as well. We're up and running for beta customers and will launch publicly soon.

It's the easiest way out there to get a ping pong bot going in Slack.

Configuration Phase on First Run

If you don't have a config.json file, I think it would be great to add in a setup phase when you first run pongbot. (Which would then create a config file.)

You could configure when seasons end (1 week / 2 weeks / etc.), configure your own pongbot webhook, placement matches, elo difficulty.. etc.

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.