Giter VIP home page Giter VIP logo

chesster's Introduction

CHESSTER Build Status Test Coverage

Introduction

This bot was created to help moderate the Lichess45+45 league.

It has a simple interface that integrates our Slack team, with Lichess and Website HTTP API.

Installation

  1. Clone this repo
  2. Install vagrant
  3. Use the included Vagrantfile to bring up the environment - vagrant up, vagrant ssh, and cd chesster
  4. Install the yarn modules - yarn install --dev
  5. Generate a classic bot token in your Slack Team's Services and Customization.
  6. Generate a heltour token from Heltour's Administration interfaces.
  7. Add both to your .env:
    CHESSTER_4545_SLACK_TOKEN="xoxb-<token>"
    CHESSTER_CHESSTER_SLACK_TOKEN="xoxb-<token>"
    CHESSTER_HELTOUR_TOKEN="<token>"
    CHESSTER_LICHESS_TOKEN="<token>"
    
  8. Migrate databases: yarn run migrate config/testconfig.js
  9. Install your bot's token in the start script, start_chesster.
  10. Start the bot. yarn run start

Useful Commands

Run these before submitting a PR:

  • yarn test
  • yarn run lint

Website Integration

This bot utilizes the heltour api from this repo: https://github.com/cyanfish/heltour/ You will need to create a token from an installation of this app in order to access and manipulate data.

The bot should now be available for addition to your Slack Team.

chesster's People

Contributors

alt-grr avatar arwagner avatar colwem avatar cyanfish avatar dependabot[bot] avatar dombrno avatar endrawes0 avatar hopffgam avatar krcarriere avatar lakinwecker avatar mathgeek avatar michael1241 avatar mirkojotic 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

Watchers

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

chesster's Issues

make a my pairings command

It should start a DM and it should tell you both of your pairings, their rating, your scheduled times and/or results and perhaps a "countdown" till your game time:

example:

Lonewolf: you play endrawes0 (1687) on Sunday at 17:00 which is in 2day, and 3 hours.
Team: You played jaivl (1987) on Saturday at 08:00 and lost.

When updating ratings, chesster should check for engine use

When updating ratings from lichess, we should probably have chesster also check to see if a particular user is marked as an engine users and inform the mods. I realize that engine use in casual and correspondence games might be allowed, but it's probably worth it for the league.

pairing command should give color information

pairing currently gives "theino will play Pasternak(2019). The game is unscheduled."

Color should be added. Ex: "theino will play white against Pasternak(2019). The game is unscheduled."

incorporate a google calendar invite to players after a scheduling post

i'm not sure how hard this would be, but assuming we have everyone's email this might be a very nice feature - i thank cal invites could even be used by people that don't have a gmail address - but i'm not sure about that

one risk might be exposing league member's emails, maybe there's a way around that...

to build on this, if chesster had a public calendar he could be included on the invites - then we'd have an easily viewable calendar of games.

just spit-ballin ideas - i missed my round 8 game because i messed up my own calendar entry...

Expand the README.md

README is lacking some detail now that we have reorganized the code base and refactored.

DM Team Captains whenever a teammate schedules a match

It's not overly difficult to keep an eye on the spreadsheet. But, since almost everything at this point can be managed from slack, it'd be nice to have an easy way for captains to keep track of if their team has scheduled or not.

Maybe even a ping on Wednesday if a teammate hasn't scheduled yet.

Thanks for what you're doing!

Make a "remind me for @endrawes0" command

This command should store your preferences in a local data storage and ensure that whenever a gamelink is posted for the player you have posted, chesster will tell you that they are playing

Change callbacks in spreadsheet.js to use promises

We are still using callbacks in a few places, notably in the spreadsheets.js - we should use promises as that means our exceptions will be caught and logged for us.

Currently, trying to schedule an unknown pairing will take him down.

remove changelog

its not used or useful when you compare to what git offers. get rid of it.

something is wrong with this gamelink

/home/endrawes0/Chesster/chesster.js:1602
if( details.winner && result.result == "1/2-1/2" ){
^

TypeError: Cannot read property 'winner' of undefined
at validate_user_result (/home/endrawes0/Chesster/chesster.js:1602:16)
at /home/endrawes0/Chesster/chesster.js:1637:28
at IncomingMessage. (/home/endrawes0/Chesster/chesster.js:1533:17)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:913:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
/
~/Chesster /

8:51 PM]
kirschwasser @cheesehead04 v @Kirschwasser 0-1
[8:52 PM]
lakinwecker hrmm
[8:53 PM]
@cheesehead04 0-1 @Kirschwasser
[8:53 PM]
chessterBOT Sorry, you do not have permissin to update that pairing.
[8:53 PM]
lakinwecker Try that format
[8:53 PM]
not sure why yours didn't work
[8:54 PM]
kirschwasser @cheesehead04 0-1 @Kirschwasser
[8:54 PM]
not working
[8:54 PM]
lakinwecker huh
[8:54 PM]
That is really odd
[8:55 PM]
@Kirschwasser: can you try it again?
[8:55 PM]
kirschwasser @cheesehead04 0-1 @Kirschwasser
[8:55 PM]
lakinwecker There is a bug
[8:55 PM]
it's trying to read your game link and failing, for some reason
[8:55 PM]
I'll file a bug and ensure a mod updates it for you

Incorrect date conversion for notifications

I am UTC-6, but I got this notification today:
forhavu vs r-mena has been scheduled for 2016-07-06 @ 11:00 UTC, which is Wed @ 13:00 for you.

Which is (for some reason) converting it it to UTC+2 !? I have tested locally and it's converting properly for me when testing locally. Note that the notification I got for my own game was also incorrect.

mooserohde vs lakinwecker has been scheduled for 2016-07-10 @ 20:00 UTC, which is Sun @ 22:00 for you.

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.