Dohyo is a Discord bot for casual gambling on sumo wrestling. In our server, we use the fantastic Twitch channel MidnightSumo to watch the games.
This bot was mostly to see what the experience of using the Discord.NET package was like (spoiler: it was great!), but feel free to use all or any part of it as a reference for creating your own bot.
Dohyo requires you to provide a token (DISCORD_TOKEN
) and a path to where the sqlite database file is to be stored (DB_URI
) as environment variables.
Build and run dohyo
with Docker:
git clone https://github.com/richardtatum/dohyo.git dohyo
cd dohyo
docker build -t dohyo .
docker run -p 8080:8080 -e DISCORD_TOKEN='valid-bot-token-here' -e DB_URI='path/to/sqlite.db' dohyo:latest
Once added, Dohyo listens for slash commands in any channel. These commands should be automatically populated by Discord into the command pop-up.
Dohyo provides the following slash commands out of the box:
The balance
command provides the users current balance available for betting. By default, every user starts with ¥1,000.
The fight
command starts a new fight, notifying users and opening the bets to everyone. NOTE: Only an admin can start a fight!
The bet
command allows the user to pick a side (left or right) and bet an amount. The amount bet must be less than their current balance for it to work
Once everyone has bet, the admin can use the end
command, passing the winning side as an argument. This brings the currently open fight to a close and distribute the winnings accordingly.
These final two commands are mostly made in jest. One person in our server asked why we could tip the adjudicator of the fights (lovingly nicknamed 'The Wizard') after betting, similar to how you would tip the dealer at a poker table. Thus these commands were created.
The tip
command allows any user to gift any amount of their current balance to The Wizard.
The wizard
command shows the current balance of the adjudicator, and just how generous your friends have been!