A Discord bot for anonymous confessions with admin review.
- Users send confessions with
/confess - Admins review them in a private channel
- Approved confessions are posted publicly
- Python 3.10+
- A Discord bot token
- A Supabase project
python -m pip install -r requirements.txtIn the Discord Developer Portal:
- Create a new application
- Add a bot
- In the
Bottab, enable:Server Members IntentMessage Content Intent
- Copy the bot token
When inviting the bot, give it these permissions:
View ChannelsSend MessagesEmbed LinksAttach FilesRead Message HistoryManage MessagesManage ChannelsManage RolesUse Slash Commands
Also include these scopes:
botapplications.commands
- Create a Supabase project
- Open database/schema.sql
- Run the full SQL from that file in the Supabase SQL Editor before starting the bot
- Go to
Settings -> API - Copy:
Project URL- your server-side secret key
Do not use a postgresql://... connection string for this bot.
Use .env.example as a guide.
Required values:
DISCORD_TOKEN=your_discord_bot_token
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_server_secret_keyImportant:
- You must run database/schema.sql in Supabase SQL Editor first
- If you skip that step, commands like
/setupand/confesswill fail because the required tables do not exist
python bot.py- Invite the bot to your server
- Run
/setup - Choose:
- the public confession channel
- the private review channel
- the admin role
Enable these in the Discord Developer Portal Bot tab:
Server Members IntentMessage Content Intent
Your SUPABASE_URL is wrong.
Use:
SUPABASE_URL=https://your-project-ref.supabase.coDo not use:
SUPABASE_URL=postgresql://...The bot is running, but it has not been invited to any server yet.
/setup: configure the confession channel, review channel, and admin role/confess: submit an anonymous confession for admin review/help: show help information about the bot/pending: view pending confessions waiting for review/stats: view confession statistics for the server/settings: view the current bot settings/toggle_badword_filter: enable or disable the bad word filter/set_filter_action: choose whether filtered confessions are flagged, rejected, or censored/add_badword: add a word to the bad word filter/remove_badword: remove a word from the bad word filter/list_badwords: list all blocked words/set_cooldown: set how long users must wait between confessions/ban_confess_user: ban a user from sending confessions/unban_confess_user: unban a server member from sending confessions/unban_confess_user_by_id: unban a user by Discord ID/list_banned_users: list all users banned from confessions/check_ban_status: check whether a user is banned from confessions
Approval actions are handled from buttons in the review channel:
Approve: post the confession publiclyReject: reject the confessionFlag: mark the confession for later review
- The warnings about
PyNaCland voice support can be ignored for this bot - Keep your Supabase secret key private