BotManualTHE COMMUNITY PLAYBOOK
English

Host a social deduction game with private roles

An admin workshop for Mafia: a worked setup, settings explained, day-to-day operation and a complete verification checklist.

12 min read

WHAT YOU WILL BUILD

A practice lobby with delivered role information, timed phases and a verified game result.

Follow the steps, try the example and use the checklist before opening it to your community.

On this page

Your mission

A practice lobby with delivered role information, timed phases and a verified game result. This workshop uses a small first rollout so you can see the complete result before opening it to the whole community. The example is a starting recipe; keep your server's own rules and audience in mind when choosing the final values.

Step 1: Prepare your server

Open your server dashboard and select the correct server, then open Mafia. Enable the feature before running the example. Choose a game channel and enough volunteers to meet the minimum. Check that private threads and the selected DM workflow are available.

Read Roles and permissions if a destination or role cannot be selected. For channel-based actions, check permissions in the actual channel, including its category overrides. For automatic role changes, the bot needs Manage Roles and a position above the role it will assign. Only grant the permissions needed by your chosen workflow.

Step 2: Build your first working example

1. Set the rules

Choose lobby, night, day and vote timers; enable doctor and detective roles as intended. Decide reveal, skip-vote, spectator and private-mafia-thread policies before assigning roles.

2. Play through a round

Fill the lobby, inspect private role delivery and complete night actions and a day vote. Keep rewards modest until a complete game ends and statistics match its result.

After changing the server-wide settings, use Save changes. An item editor, draft, preview or test action is a separate part of the workflow: read its save or publish action before expecting a public Discord post. Reopen the saved item to confirm the destination, access rules and values you intended.

Step 3: Understand the settings

Initial values below describe a new configuration. Your server may already have different saved values. A field with no initial value is chosen in its editor. Optional sections can stay inactive until the basic setup works. Empty and zero do not have one universal meaning; use the explanation for that specific field.

General

SettingInitial valueWhat it changes and how to use it
ChannelNot setThe bot needs to post, embed links, and create private threads here.
Ping roleNot setPinged when a lobby opens.
Minimum players5Fewer when the lobby closes → the game is cancelled. 4–20; whole numbers.
Maximum players12Maximum lobby size. The lobby starts when full; the server plan may impose a lower limit. 4–20; whole numbers.
Lobby time10How long the lobby stays open before the game starts. 1–1440; whole numbers.
Night seconds90Time available for night-role actions. Longer nights help new players read private controls; shorter nights keep experienced tables moving. 30–1800; whole numbers.
Day seconds120Discussion. 30–3600; whole numbers.
Vote seconds60Time available for the public voting phase. Set it separately from discussion time so members have time to submit the choice they discussed. 30–1800; whole numbers.
Day limit12If nobody has won after this many days, the game ends in a draw. 3–30; whole numbers.
Staff rolesNo entriesBesides members with Manage Server. up to 25 entries.
Embed color#E0245EAppearance of this part of the card or interface. A color change does not change eligibility or permissions.

Roles

SettingInitial valueWhat it changes and how to use it
Roles → Mafia members0Auto = a quarter of the players (at least 1). Always fewer than the town. 0 = automatic (a quarter of the players, at least 1). 0–6; whole numbers.
Roles → DoctorOnProtects one player each night.
Roles → DetectiveOnLearns each night whether one player is mafia.

Rules

SettingInitial valueWhat it changes and how to use it
Rules · reveal rolesOnShow the role of an eliminated player.
Rules · doctor selfOnThe doctor may protect themselves.
Rules · doctor repeatOffThe doctor may protect the same player two nights in a row.
Rules · allow skipOn"skip" option in the day vote.
Rules · mafia threadOnPrivate thread for the mafia (needs Create Private Threads).
Rules · dmsOnRole cards + night actions by DM (the in-channel "My role" button always works).
Rules · anyone can hostOnAnyone may open a lobby (else staff only).

Spectators

SettingInitial valueWhat it changes and how to use it
Spectators → Eliminated players see every roleOnFun for the dead — they’re trusted not to tell.
Spectators → Members not in the game see every roleOffFor watch parties.

Rewards

SettingInitial valueWhat it changes and how to use it
Rewards → For playing0Every player of a finished game. Bank coins for every player of a finished game (0 = off). 0–100000; whole numbers.
Rewards → For winning0Extra for each member of the winning team. 0–100000; whole numbers.

Step 4: Configure the items inside this feature

Server-wide settings and individual entries serve different purposes. These tables describe the selected entry editors. Set up one complete entry first, save it, and confirm it works before adding the rest. Fields for an alternative type apply only when that type is selected.

Lobby

SettingInitial valueWhat it changes and how to use it
Lobby minutesNot setTime available to gather players before the lobby deadline. Check the minimum-player requirement alongside this value; a long lobby does not guarantee enough participants. 1–1440; whole numbers.

Test the whole journey

  1. Start a practice lobby and verify each participant receives only the intended role information.
  1. Complete phase transitions and inspect elimination visibility and the final winning team.
  1. Repeat the relevant member action with an ordinary member account and the staff action with your intended staff role. An administrator test alone can hide permission restrictions. Check both the response in Discord and the saved record or result in the dashboard.
  1. Change one setting that affects the result, save it, and repeat the same test. Record the previous value so you can restore it if the new behavior is not what you wanted.

Follow the complete workflow

1. Set up the game channel

Open your server dashboard, choose your server and turn on Mafia in the Engagement section. Pick the game channel, player counts, timers, roles and rules, with a live preview of the lobby and night panel.

2. Open a lobby

Anyone (or only staff, if you prefer) runs /mafia start. The lobby lists players and the role line-up, and fills up through the Join button until the timer runs out or the host starts.

3. Play nights and days

The bot deals the roles, runs each night and day, narrates who died and counts the votes. Dead players can spectate and, if you allow it, see every role.

4. Results and rankings

When the town or the mafia wins, the results post every role and fate. /mafia stats and /mafia leaderboard keep the bragging rights going.

Operation and behavior in detail

A game that never loses its place

The whole game lives in the database, so a bot restart picks up exactly where it stopped, and every phase moves only once even when buttons, the timer and staff act at the same moment. Staff can push the game to the next phase with /mafia next or cancel it, and the dashboard shows the live game, the public log, the full history of past games and the leaderboard.

Games need at least 4 players. Free servers play with up to 10 players per game, Pro servers with up to 20. Flows can open a lobby and react when a game starts, a player is eliminated or a team wins.

  • /mafia start, /mafia join, /mafia leave: lobby commands
  • /mafia role, /mafia spectate: your secret role panel, or watch the game
  • /mafia stats, /mafia leaderboard: members’ records and the server ranking

Diagnose actual bot responses

Use the response to identify the failing stage before changing settings. The messages below are referenced by this feature’s current handlers. Values in square brackets represent the member, amount, time or other live detail supplied in Discord; they are not text to enter. Different actions can use different guards, so this list is a diagnostic reference, not a claim that every message appears in every workflow.

Response or conditionAdmin investigation and next step
No Mafia game is running right now.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
A Mafia game is already running — finish or cancel it first.Open the existing record and confirm its current result before creating a replacement. An already-completed response can indicate that the first action succeeded.
The game has already started.Open the existing record and confirm its current result before creating a replacement. An already-completed response can indicate that the first action succeeded.
The lobby is full ([max] players).Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
You are not playing in this game.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
You have been eliminated — you can still spectate.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
That phase is over — open your role panel again.Inspect the current state and use a current record or interaction. Decide whether a new operation is intended before recreating something that may already have settled.
Your role has no night action. Sleep tight!Inspect this member’s eligibility and the server’s policy for this operation. Establish which condition failed before changing roles or making an exception.
You can’t target another member of the mafia.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
You can’t pick yourself for that.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
You can’t protect the same player two nights in a row.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
That player can’t be picked.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
Only staff can do this (Manage Server or a Mafia staff role).Check the actor’s Discord permissions and the feature’s configured staff roles. Test the intended member and staff paths separately; a server administrator can mask missing role access.
Only the host or staff can do this.Check the actor’s Discord permissions and the feature’s configured staff roles. Test the intended member and staff paths separately; a server administrator can mask missing role access.
I’m missing permissions in the Mafia channel.Inspect the bot’s effective permission in the exact destination and the relative position of any role it must manage. Re-test the original action after correcting the specific missing access.
No Mafia channel is set — pick one in the dashboard first.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
The game hasn’t started yet — roles are dealt when the lobby closes.Inspect this member’s eligibility and the server’s policy for this operation. Establish which condition failed before changing roles or making an exception.
This game is over.Inspect the current state and use a current record or interaction. Decide whether a new operation is intended before recreating something that may already have settled.
You’re still in the game — no peeking!Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.
At least [min] players are needed to start.Match this response to the affected action and its current record. Compare the selected target, saved configuration and expected result; confirm what completed before retrying a state-changing action.

After a correction, repeat the original action with the affected member permissions and inspect its final state. For a reward, payment, role change or public post, verify what already completed before applying a manual replacement. Keep the record identifier and response in your staff notes so a second admin can follow the same incident.

When something looks wrong

SymptomWhat to inspectHow to recover
A player cannot perform a night actionCurrent phase, alive state, role and private-message access.Use the correct phase interaction and repair delivery access before restarting the whole game.
The saved setup produces no visible resultWhether the feature is enabled, the required action has actually happened, and the selected destination still exists.Follow the worked example once, then inspect the response before retrying. A saved configuration alone does not perform every action.
Staff can use it, but an ordinary member cannotMember eligibility, selected roles, channel overrides and Discord command permissions.Test with the affected role combination. Correct the specific restriction and test again.
A role, reward or message is missingThe related feature, destination permissions and the result of the original action.Confirm what already completed before repeating an action that spends currency, sends a message or grants a reward.

Feature-specific questions

How do I play Mafia on Discord?

Turn on Mafia in your server dashboard and pick a game channel. Someone runs /mafia start, players click Join, and the bot deals roles and runs every night, day and vote.

Is this the same as Werewolf?

Yes, it’s the same social deduction game. The mafia are the werewolves, the town are the villagers, and the doctor and detective (the seer) work the same way.

How many players do I need?

At least 4. You choose the minimum and maximum, up to 10 players on Free and up to 20 on Pro.

What if a player has DMs closed?

They can still play. The My role button and /mafia role show their role and night action privately in the channel.

Can people watch without playing?

Yes, with /mafia spectate. Dead players can see every role if you allow it, and you decide separately whether outside spectators may.

Launch checklist

  • Start a practice lobby and verify each participant receives only the intended role information.
  • Complete phase transitions and inspect elimination visibility and the final winning team.
  • The saved setup and the actual Discord result match the example you chose.
  • A regular member and the intended staff role can complete their respective steps.
  • Optional rewards, notifications and public destinations are intentional.
  • Another admin knows which settings to change, how to inspect a result and how to stop or correct the workflow.

Share Mafia basics with someone who needs an overview. Use the command reference below for exact command names and required options.

Commands for this feature

CommandWhat it doesOptions
/mafia startOpen a Mafia lobby in the game channellobby_minutes optionalHow long the lobby stays open (minutes)Whole number · Minimum: 1 · Maximum: 1440
/mafia joinJoin the open lobbyNo options
/mafia leaveLeave the lobbyNo options
/mafia roleShow your secret role and night actionNo options
/mafia spectateWatch the running gameNo options
/mafia nextMove the game to its next phase now (staff)No options
/mafia cancelCancel the game (staff, or the host in the lobby)No options
/mafia statsMafia stats of a membermember optionalMemberSelect a member
/mafia leaderboardMafia leaderboard of the serverNo options

Find an answer

Search features, commands and the full text of every guide.

Start typing to find a guide.

Browse all guides