// hunnaG / bots / mafiabot

MafiaBot

Play Mafia, the party game of secret roles and accusations, in a Discord channel, with the bot as the narrator.

Released · Updating (Slowly)Discord botDiscord

Mafia (also played as Werewolf) is a party game for a group: a hidden few are the Mafia, and everyone else has to work out who they are before it is too late. It usually needs a narrator who sits out to run it. MafiaBot is the narrator, so everyone gets to play.

The bot sends each player their role in private. At night every player presses a button and gets a private menu for their role: the Mafia choose a target, the Doctor protects someone, the Detective investigates, the Vigilante shoots and the Lookout watches. By day everyone votes with a dropdown. The bot checks for a winner after every phase.

  • Four or more players; start with everyone in your voice channel in one command.
  • Eight roles: Mafia, Godfather, Doctor, Detective, Vigilante, Lookout, Jester and Townsperson.
  • A private thread where the Mafia can plan.
  • Rules you can tune per server, and player statistics.
First five minutes
  1. Add it. It needs to send messages; the thread permissions are optional and give the Mafia a private place to talk.
  2. Gather at least four players, then /mafiabot startgame players:@a @b @c @d, or players:vc to use everyone in your voice channel.
  3. Roles arrive by DM. A player whose DMs are closed gets a private 'View my role' button in the channel instead.
  4. Optionally, as an admin, tune the rules with /mafiabot settings, including how long a vote lasts. /mafiabot admins add lets a game-master role do that too.
Good to know

Each night step has a 60-second timer and the day vote has one you can set, so a player who walks away cannot freeze the game. The settings include a testing switch that reveals every role at the start; it is labelled as such.

Need help? Ask in the hunnaG Discord.

Commands

Anyone can use the first group. The second is for the people who run the server.

For everyone

  • /mafiabot startgame

    Start a game in this channel with the players you mention, or type vc to use everyone in your voice channel. Four players minimum.

    you/mafiabot startgame players:@a @b @c @dMafiaBotStarting a game of Mafia with 4 players: a, b, c, d Roles are sent by DM. If your DMs are closed, a View my role button will appear in this channel. The Mafia get a private thread here to plan in. Night 1 [ Perform Night Action ]
  • /mafiabot stats

    This server's totals and leaderboards.

    you/mafiabot statsMafiaBotMafia Stats - Your Server Total Games Run 23 · Mafia Wins 10 (43%) · Townsfolk Wins 12 (52%) · Jester Wins 1 (4%) Leaderboards: Most Kills (Mafia), Most Saves (Doctor), Most Mafia Found (Detective), and more.
  • /mafiabot mystats

    Your own record on this server.

    you/mafiabot mystatsMafiaBotalex's Mafia Stats Total Games 12 · Total Wins 7 (58%) As Mafia · Played: 3 | Wins: 2 (67%) | Hanged: 1 As Doctor · Played: 2 | Wins: 1 (50%) | Hanged: 0 · Successful Saves: 3
  • /mafiabot help

    Every command, plus how roles and the Mafia thread work.

    you/mafiabot helpMafiaBotMafiaBot help For everyone · For admins · Setup, owner and administrators: one line per command Getting your role: roles are sent by DM when a game starts; if your DMs are closed, press the View my role button in the game channel. Mafia thread: the Mafia get a private thread to plan in; without the thread permissions they are asked to use a group DM instead. Made by @hunnaGOnly you can see this · Dismiss message
  • /mafiabot info

    The build, the links, a check of the permissions it has in this server and channel, and this server's setup. Same on every hunnaG bot.

    you/mafiabot infoMafiaBotMafiaBot A full game of Mafia in a text channel, with secret roles, night actions, votes, and stats. Hub page · Terms · Privacy · Invite · Invite with every feature Build: 3f2a1c9 · 2026-10-08 · up 2d 4h · in 4 servers Permissions here: ✅ View Channels · ✅ Send Messages · ✅ Embed Links · ✅ Create Private Threads (optional) · ✅ Send Messages in Threads (optional) · ❌ Manage Threads (optional): missing. Locks the Mafia thread when the game ends. · Privileged intents: Server Members This server: Admins: the server owner, administrators, and @Game Master · Settings: vote length 5 min, mafia ratio 1 in 4, reveal on death off · Games here: 0 running, 23 played Made by @hunnaGOnly you can see this · Dismiss message
  • /mafiabot admins list

    Who may change the settings and force-end games here.

    you/mafiabot admins listMafiaBotMafiaBot admin roles The server owner, administrators, and @Game Master How it works: Admins run the admin commands. The owner and administrators always can, and they change this list with /mafiabot admins add and /mafiabot admins remove. Made by @hunnaGOnly you can see this · Dismiss message

For admins

  • /mafiabot admins addadmin

    Let a role change the settings and force-end games. The owner and administrators always can, and only they can change this. Same on every hunnaG bot.

    you/mafiabot admins add role:@Game MasterMafiaBot✅ @Game Master can now run MafiaBot's admin commands here.Only you can see this · Dismiss message
  • /mafiabot admins removeadmin

    Revoke that.

    you/mafiabot admins remove role:@Game MasterMafiaBot✅ @Game Master no longer runs MafiaBot's admin commands here.Only you can see this · Dismiss message
  • /mafiabot settingsadmin

    Role ratios, vigilante bullets, vote length, reveal and tally options. Admins only.

    you/mafiabot settingsMafiaBotMafia Bot Server Settings Mafia Starting % · Godfather Starting % · Doctor Starting % · Detective Starting % · Vigilante Starting % · Lookout Starting % · Jester Starting % · Vigilante Bullets · Vote Length · Reveal Role on Death · Show Vote Tally … [ Edit Mafia Ratio ] [ Edit Vote Length ] [ Toggle Role Reveal ] …Only you can see this · Dismiss message
  • /mafiabot forceendadmin

    End the channel's game and reveal every role. Admins only.

    you/mafiabot forceendMafiaBotGAME FORCE ENDED Game Over - Role Summary alex was the Mafia · sam was the Doctor · kim was the Detective · lee was the Townsperson
Try a command

Type a command the way you would in Discord. The replies are the bot's own; nothing is sent anywhere.

What it needs

Requiredwithout these the bot cannot do its job

  • View ChannelsSees the game channel.
  • Send MessagesRuns the game in the channel.
  • Embed LinksRole cards and phase posts are embeds.

Optionaleach one switches on an extra part

  • Create Private ThreadsOpens a private thread where the Mafia plan each night. Without it, the Mafia are asked to make a group DM instead.
  • Send Messages in ThreadsLets the bot talk in that Mafia thread.
  • Manage ThreadsLocks the Mafia thread when the game ends, and on some servers is what lets the bot add the Mafia to it.

Reads: Server Members intent, starting a game from a voice channel and matching votes to players uses the member list. These are Discord's privileged intents, already switched on for this bot.

// keys

Keyboard

jd
next entry
ka
previous entry
enterspace
open or close the focused entry
esc
close the focused entry, or this panel
/
find a project, a command, or a page
?
this panel

    ↑ ↓ to move · enter to open · esc to close