This SummerHacks Hackathon project is a Discord bot that hosts deception games.

Problem

As a friend group, deception games are our favorite pastime because of how intense and bonding they are. And when COVID hit, it was the first thing we started missing about hanging out in person.

Solution

We realized that technically an extra person could help host the game over discord instead of playing... but better yet, that extra person could be a bot! That way, the tedious parts like picking roles and relaying messages can happen automatically, and everybody gets to play.

We considered the full list of deception games we knew, and decided to narrow it down to starting with two classics: mafia (for its simple secret role-based collaboration) and coup (for its use of cards and currency).

Mafia

Traditionally, at night the mafia members secretly decide who to kill by mouthing words and pointing. On discord, this process text-based by forwarding messages between players in the bot's DMs, and using a ?kill command. For cops, we did the same thing with ?inspect.

Both of these actions only work at night and if you have the correct role.

At the beginning of the game, the bot creates a Town Hall voice channel, and automatically moves all players into it, removing an extra step for the players. At night, the bot mutes everyone so that the mafia and cops can type without being caught.

Normally, accusing and voting happens by pointing and raising your hand publicly. On discord, the player uses the ?accuse and ?vote commands, and once everyone has submitted their votes, the results are displayed for all to see. The bot also handles tie votes.

Coup

Because of the sheer number of actions in Coup, we decided to make the actions entirely button-based instead of text-based, reducing the learning curve for the players.

We also made sure that the display is unique to each player, like only showing buttons for actions they can afford, and only showing the values of their own cards and the cards that other players have flipped over.

The underlying logic of the game gets really complex, but ultimately comes down to interacting with simple objects: the influence cards and players' currency.

A big part of coup is challenging players on whether they have the card to back up their action, a bit like in the card game BS. This game element allows for complex deceptive strategy and mind-blowing plot twists.

The Future of Discord Deception

The best part about starting with these two games is that together, they cover huge parts of the code for other games. This means that this project is scalable not only for coding more of our favorite games for discord, but also for designing and implementing brand new deception games.

Playing deception games is a great and easy way to connect with people, and now, connecting with people just got a little easier.

Built With

Share this project:

Updates