DiscordHoldem is a Discord bot for handling Texas Holde'em tables across channels.
What is Discord? (Discord)
How to write Discord Bot using Python? (discord.py)
- I assume that you already have your BOT account created (if not visit Discord Developer Panel)
- Create file named _token.py in main directory and put there a line token='YOUR_TOKEN' where YOUR_TOKEN is a token taken from developer panel.
- Add bot to your server (Here is how)
- Run py main.py
Command | Outcome |
---|---|
!a init | Initialize a poker table on current channel. There can be at most one table opened per channel. |
!a close | Close a poker table on current channel. Bot will clean up messages and delete reactions. |
After init command bot will create three messages and attach available reactions to the middle message.
First and last message are for pushing information. First is dedicated to push overall information about a table (player stand or sit; game starting) Last is dedicated to push information about current game (player raise; fold; game results)
Once you created the table you can make interaction with the game by reacting to main message created by bot.
Emoji | Outcome |
---|---|
Sit at the table | |
Stand from a table | |
Check yourself as ready to play | |
Fold | |
Check if no bet was placed or call to current bet | |
Raise by amount of Big Blind | |
Raise by all your money |
To start playing sit at the table and check that you are ready, after period of time the game should start if there is enough ready players at the table. You will get your cards in private message. The value of current hand you get in private message will update after each game phase (flop, turn, river). If you want to leave the game uncheck the ready button and you will be excluded from next game.
- Make bot handle a tie rounds and rounds where there is all-in player winning the pot.
- Optimize bot to update messages only once per request.