Your messages are kept secret! A Discord bot for sending self-destructing secret messages.
- Self-Destruct Channel Messages: Send messages in channels that delete after being read
- Self-Destruct DMs: Send private messages that automatically delete after being viewed
- Custom Timeouts: Set custom deletion times (seconds, minutes, hours, days)
- Secure Access: Only the intended recipient can reveal the message
- Visual Countdown: Shows a countdown before message destruction
-
Clone the repository
git clone <your-repo-url> cd secret-bot
-
Install dependencies
npm install
-
Configure the bot
cp config.json.example config.json
Edit
config.jsonand adjust settings as needed:defaultTimeout: Default time (in seconds) before messages self-destruct (default: 10)
-
Set up your environment Create a
.envfile with your Discord bot token and other credentials -
Deploy commands
node deploy-commands.js
-
Run the bot
node index.js
Send a message in the current channel that will be deleted after the receiver reads it.
Options:
user(required): The intended receivermessage(required): The message to sendseconds(optional): Timeout in secondsminutes(optional): Timeout in minuteshours(optional): Timeout in hoursdays(optional): Timeout in days
Send a DM that will be deleted after the receiver reads it.
Options:
user(required): The user to DMmessage(required): The message contentseconds(optional): Timeout in secondsminutes(optional): Timeout in minuteshours(optional): Timeout in hoursdays(optional): Timeout in days
The bot uses config.json for configuration (not tracked in git):
{
"defaultTimeout": 10
}Note: config.json is gitignored to prevent accidentally committing sensitive configuration. Use config.json.example as a template.
- Sender creates a self-destruct message with a custom timeout
- Only the intended recipient can click the "Reveal" button
- Once revealed, the message remains visible for the specified timeout
- A countdown shows the remaining time
- The message automatically deletes when the timer expires
- Messages can be opened at any time before the timeout expires
- The timeout countdown only starts after the message is revealed
- If a message is never opened, it will expire and become unreadable
- Maximum recommended timeout: A few hours (for very long timeouts, consider database storage)
- Built with Discord.js
- Uses message component collectors for button interactions
- Automatic cleanup of expired messages
- Ephemeral notifications to preserve privacy