This bot allows server members to send anonymous messages to a designated channel via Direct Messages (DMs).
- 📨 Anonymous Messaging — Users send a DM to the bot, and the bot posts it anonymously to the server, keeping the sender's identity a secret.
- ⚙️ Interactive Setup Panel — An admin-only
/setup
command that provides buttons, dropdowns, and modals for effortless configuration. - 🔧 Fully Configurable — Set the destination channel and user cooldown duration.
- 🚫 Spam & Abuse Prevention — Features a configurable, per-user cooldown system and automatically blocks messages containing links or file attachments.
- 💾 Persistent Settings — Configurations are saved in a
config.json
file, so your settings are never lost on restart. - 🎮 Bot Presence — Display "Receiving Secret Messages | DM me!". This status is set automatically when the bot starts.
Follow the steps below to run this bot on your own server.
- Python 3.8+ — Download here
- pip — Comes with Python
- Git — Download here
- Go to the Discord Developer Portal
- Click "New Application", give it a name
- Navigate to the "Bot" tab, click "Add Bot", then confirm
- Still under the "Bot" tab, click "Reset Token" to get your bot token
- Store it securely — Never share it publicly
-
Under the "Bot" tab, scroll to "Privileged Gateway Intents"
-
Enable both:
- PRESENCE INTENT
- MESSAGE CONTENT INTENT
-
Go to the "OAuth2" tab, then "URL Generator".
-
In the "SCOPES" section, check both bot and application.commands.
-
In the "BOT PERMISSIONS" section that appears, check the following permissions:
-
Send Messages
-
View Channels
-
-
Copy the generated URL at the bottom and open it in your browser to invite the bot to your server.
Open your terminal:
git clone https://github.com/AdityaLF/Discord-SecretMessage-Bot.git
cd Discord-SecretMessage-Bot
Navigate into the project folder in your terminal and install the required libraries.
pip install -r requirements.txt
Your secret bot token is stored in a .env
file. A template file (.env.example
) is provided to guide you.
- Open the template file,
.env.example
- Fill it out by replacing
bot_token_here
with your actual bot token. - Save your changes, then rename the file from
.env.example
to.env
After saving your changes and ensuring dependencies are installed, run the bot with:
python bot.py
- GitHub: @AdityaLF
- Discord: @05.07am
- Support Me: ko-fi.com/adityaf
This project is licensed under the MIT License.