Hanabi Slack bot
APACHE-2.0 License
This is a Slack bot that allows users to play the cooperative card game Hanabi with one another.
Download and install Rust.
Create a new bot user here.
Note down the bot user's API Token.
Invite the bot user to a channel called #hanabi
(it may be
private).
Run the bot with
$ env "API_KEY=XXX" cargo run
where XXX
is the API token from step two.
At this point, the bot should make an announcement in #hanabi
that
players can join.
Players must first notify the Hanabi bot that they wish to play. They do
so by sending the bot join
in a direct message. If you no longer wish
to participate in games, use leave
.
The bot will try to construct games of five players. Once there are two
or more players, any player can instruct the bot to start
, which
causes it to start a game with however many players are available.
A player can only be in one game at any given point in time.
During play, a player can play, clue, and discard:
play <card>
, where <card>
is the index of the carddiscard <card>
, where <card>
is the same as forplay
.clue @player <specifier>
where @player
is the user<specifier>
is either a color (e.g., red
), or atwo
). The leading clue
keyword is optional.In addition, use hands
to show all players' hands, and what each
player knows about their hand, discards
to show the discard pile,
deck
to show the number of cards left in the deck, and ping
to
remind the current player that it's their turn. You can also terminate
the current game using quit
.
When new cards are drawn, they appear on the right-hand side of your hand.
All of these are fixable. PRs are welcome.