Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

splitting the stats: overall top 3 leaderboard and a weekly leaderboard (based on only games played that week) #17

Open
jsrubin opened this issue May 10, 2016 · 3 comments

Comments

@jsrubin
Copy link

jsrubin commented May 10, 2016

No description provided.

@michaeljacobdavis
Copy link
Owner

Interesting.

  • Would you rather a rolling past 7 days? Or reset every week (say Monday)?
  • Right now the leaderboard is in the channel topic. Should that be the weekly or overall?

Either way shouldn't be hard to do. We are logging both wins and losses per person, as well as games (https://github.com/michaeljacobdavis/foos-bot/blob/master/lib/listeners/win.js#L17), with timestamps so you should be able to just manipulate that to get the stats.

The db is https://github.com/typicode/lowdb, so anything lodash has, you can use to operate on the db.

Let me know if you want to take a shot at it.

@jsrubin
Copy link
Author

jsrubin commented May 13, 2016

i like the rolling past 7 days.
i will take a shot at it however i started looking the es6 and it made my brain hurt.

@michaeljacobdavis
Copy link
Owner

michaeljacobdavis commented May 13, 2016

Nice. No problem. It's backwards compatible, so feel free to write it in ES5 and we can run it through a codemod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants