dblock / slack-gamebot

Ping pong, chess, pool and other games bot for Slack.
MIT License
129 stars 103 forks source link

Post scores from a webhook #133

Open Cr4nkY4nk3r opened 7 years ago

Cr4nkY4nk3r commented 7 years ago

Is it possible (or could it be implemented) to post scores from a webhook?

We've got a scoreboard that we're using, and could generate a POST with the winner, loser, and full score, but pongbot won't record it without it being manually posted by an actual user.

dblock commented 7 years ago

It's definitely possible to implement by turning the read-only matches API into a r/w one, inspired by whatever code in https://github.com/dblock/slack-gamebot/blob/master/slack-gamebot/commands/lost.rb. If you want to give it a shot I'd be glad to coach you through coding that.

dblock commented 7 years ago

If admins could record a match on behalf of another user (small amount of work), another option would be to expose all commands via a generic webhook and provide a mechanism for identifying a user. For example each user could just have a generated token and you could post on behalf of such user.