Protects sensitive strings and logs access in Discord
String Guardian is a serverless Discord bot that protects sensitive messages (like server IPs, connection strings or passwords) behind a reveal button, with logging to track who accessed them.
👉 Add String Guardian to your server (Privacy Disclaimer)
✨ Features:
- 🔐 Protect sensitive messages behind a reveal button
- 👁️ Track who viewed your strings, with timestamps
- ⚡ Simple /string command for posting protected content
- 🔔 Optional role pings to alert the right users
🎯 Use cases:
- 🎮 Perfect for Pickup Game (PUG) Discord servers or any community that wants to share connection info in public channels while tracking which members access it — making it easier to handle trolls, harassers, or DDoSers.
How it works:
- Use
/stringto create a protected message - Members click Reveal String to see it (ephemeral)
- Moderators click View Logs to see who revealed it
- Admins can use a
/configurecommand to enable or modify features
Create a protected string message using the /string command:
And entering your string content into the form:
This will send a message to the channel.
When a user clicks the Reveal String button:
- The user ID and timestamp is logged
- An ephemeral message is sent to the user containing the string (only the user can see it)
When a user clicks the View Logs button:
- An ephemeral message is sent to the user containing a list of every Discord user who viewed the string and the timestamp
The /configure command will only be visible to users with the MANAGE_CHANNELS permission (admins).
Configure settings for the specific text channel using the /configure command:
Add String Guardian to your Discord server:
👉 Click here to invite the bot
Privacy Disclaimer: This bot stores data such as Discord IDs, timestamps, and submitted string content. Data will not be shared unless required for legal compliance. Data may be deleted at any time at the discretion of the bot owner.
Local Development
Ensure that the Discord bot is created on the Discord developer portal.
Create .dev.vars and fill the variables as per .dev.vars.example using
information from the Discord developer portal.
Install NPM dependencies:
npm installRegister the Discord commands using the registration script:
npm run registerInstall and run local development server:
npm run devReset (& run migrations) for the local D1 development database:
npm run db:resetEnsure Ngrok is installed and run it to provide a reverse proxy to access your locally-running bot:
ngrok http 8787Copy the global URL from the Ngrok console and paste it into the "Interactions URL" input field for your App in the Discord developer portal.
You can now install the bot onto a Discord server and test your locally-running code.
Deployment
To ensure that the CICD deployment pipeline works, ensure that the following secrets are configured under Settings > Secrets and variables > Actions: settings are configured:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
To ensure that the deployed Cloudflare Worker has the environment variables required for operation, ensure that the following secrets are configured under Settings > Variables and Secrets:
APP_IDBOT_TOKENPUBLIC_KEY
Released under the MIT License.









