cjsaylor / chessbot Goto Github PK
View Code? Open in Web Editor NEWSlack bot for playing chess.
Home Page: https://www.chris-saylor.com/chessbot/
License: MIT License
Slack bot for playing chess.
Home Page: https://www.chris-saylor.com/chessbot/
License: MIT License
Ref: https://api.slack.com/changelog/2020-01-deprecating-antecedents-to-the-conversations-api
The im.open
is being removed in Feb 2021 and is replaced by the conversation API. This is currently being used in the challenge system because we open an IM with the challenged player to ask them if they wish to accept the challenge.
While this is nice normally, if you reload slack or visit it from another device, it looks like all the images are the same (current state).
Need to include a PGN path as part of the parameters so we can still load the game from the backend and progress to the last part of the provided PGN.
I can't seem to castle queenside in a game.
the game was in this thread https://drawmeclose.slack.com/archives/C01GJRLD0BW/p1607385649001400
Dependabot couldn't find a Gopkg.toml for this project.
Dependabot requires a Gopkg.toml to evaluate your project's current Go dependencies. It had expected to find one at the path: /Gopkg.toml
.
If this isn't a Go project, or if it is a library, you may wish to disable updates for it from within Dependabot.
You can mention @dependabot in the comments below to contact the Dependabot team.
Is your feature request related to a problem? Please describe.
I'm frustrated that if I don't realize I made a mistake within a minute I can't take back a move even when the person I'm playing against agrees that I should be able to take it back.
Describe the solution you'd like
Either
a) a mechanic where if I can take back a move if both my opponent and I agree it can be taken back (e.g, I say @ChessBot takeback and if my opponent agrees he says @ChessBot allow, or something similar) or
b) a setting where you can change the take back time from 0 to anytime before the next player makes a move
Additional context
That's it! Thanks for programming the app. It's great!
Slack's client does some image caching, however if you visit an older thread game or come back to it after some time, it hits the server again for the image. These can have a long cache time because they are immutable.
Currently the entire game is from the point of view of the white player. Giving black a disadvantage. When it's black turn, the board should flip to show black perspective.
If a player starts a new game in the current thread, the previous game will be overwritten (as it will have the same thread ID).
Dependabot couldn't find a Gopkg.toml for this project.
Dependabot requires a Gopkg.toml to evaluate your project's current Go dependencies. It had expected to find one at the path: /Gopkg.toml
.
If this isn't a Go project, or if it is a library, you may wish to disable updates for it from within Dependabot.
You can mention @dependabot in the comments below to contact the Dependabot team.
Thanks for a great app btw :)
Love this... Absolutely love it. Best Slack plugin ever.
That said, I find it very difficult to plan my next move when the board is rotated 180 degrees and re-drawn after each move, though. If there was a way to prevent the board from rotating after each move so that it looks the same all the way through the game, this'd be fab.
Try to detect when not putting in a valid challenger and provide some help context.
Hi
Chessbot stopped responding to our commands in Slack a few days ago, so I tried removing it and re-adding it to the workspace to see if that would fix it, but when I do that I'm confronted with a Cloudflare error page:
Seems the server chessbot runs on is down, which is a shame, it's been very fun to use. Is there any chance it can be restored?
Cheers
Right now it shows "Does not compute :(", it should show the error and a link to the help website.
Describe the bug
Resigning at the very beginning of a match causes a panic and the bot does not respond to the user for the resign command.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The game should end with the other player being awarded the win. Alternatively, if there are no moves, simply "cancel" the game and don't declare a winner.
Allow a player to request a take back via:
@chessbot propose takeback
which would send an ephemeral message to the opposing player to request yes/no. If yes, the game would rollback a move.
Use slack's V2 Oauth2 implementation that allows for granular permissions.
Either the 3-fold repetition rule or a manual draw command that can be entered to end games without one player having to resign.
Dependabot couldn't find a Gopkg.toml for this project.
Dependabot requires a Gopkg.toml to evaluate your project's current Go dependencies. It had expected to find one at the path: /Gopkg.toml
.
If this isn't a Go project, or if it is a library, you may wish to disable updates for it from within Dependabot.
@ChessBot concede
or
@ChessBot resign
It should have a similar workflow to the challenge workflow. One player requests, other player rejects or accepts.
Is your feature request related to a problem? Please describe.
I challenged player x, and I became white. After the game was ended, player x challenged me for a new game. I was playing white again.
Describe the solution you'd like
I'd like the ability to choose who should play white when a new challenge is set ut, e.g.:
@challenge @user white
Describe alternatives you've considered
Perhaps the syntax could be even a bit more intuitive
@challenge @user as white
Additional context
Whatever the current logic is for selection of color, it would be nice to have that logic described in the docs.
Keep up the good work!
Describe the bug
When moving a pawn to the last rank, it isn't clear how to indicate the pawn promotion and manifests in simply saying "invalid move".
To Reproduce
FEN: r2q1rk1/p1n3Pp/2Q5/1p1p2p1/1P1P2n1/P1N1P3/1BP2P2/R3K2R w KQq - 0 1
go run cmd/repl/main.go "r2q1rk1/p1n3Pp/2Q5/1p1p2p1/1P1P2n1/P1N1P3/1BP2P2/R3K2R w KQq - 0 1"
Attempt to move the white pawn to final rank: g7f8
.
Expected behavior
For the pawn to advance to f8 and convert to a queen.
Additional context
It is able to advance if you indicate the promotion piece at the end of the move notation, but it isn't clear how to do it and the error is not helpful: g7f8q
(where q is the piece I want to promote to).
It is using the long algebraic notation for ease of communicating moves to the bot, however this notation does not import well into external chess programs.
Lichess supports a POST endpoint for importing a game via PGN.
Here is an example request:
curl 'https://lichess.org/import' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36' \
-H 'Referer: https://lichess.org/paste' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Accept-Language: en-US,en;q=0.9' \
--data 'pgn=1.d2d4+d7d5+2.e2e3+g8h6+3.f1b5+c7c6+4.b5d3+e7e6+5.g1f3+f8b4+6.c2c3+b4e7+7.c3c4+e8g8+8.c4c5+b7b6+9.b2b3+b6c5+10.d4c5+e7c5+11.c1a3+d8d6+12.d1d2+c5a3+13.e1g1+a3b4+14.d2c1+c8a6+15.d3a6+b8a6+16.a2a3+b4a5+17.b3b4+a5d8+18.f3d4+a8c8+19.b1c3+h6g4+20.h2h3+*'
It responds with a 303 with a location header that we can redirect the user to.
It can be as simple as a file (we can mount the file to the host system via docker volume).
Describe the bug
I've just played a game that led to a checkmate (see screenshot), however the game didn't end. No moves were valid. We ended by resignation
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We expected the game to end. If there was some move that we should have made instead, please feel free to cancel this issue.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
IE, when it is black's turn, have the board attachment have a dark color, and when it is white's turn, have a light color.
https://api.slack.com/messaging/scheduling
When a player makes a move, ChessBot
sends a message with the updated gameboard.
In addition to this, we can use the scheduling message API above to set a reminder in the thread to make a play after X hours (say 3 hours). If another turn is played, use the scheduling API to delete the existing scheduled message (if exists) and create another.
If the game ends, do not schedule the message.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.