A Discord bot that rewards users with vouch points for posting pictures in channels with "vouch" in the name.
- 🖼️ Automatic Vouch Detection: Requires an image and a mention of a member with the Provider role in a
vouch
channel - 📊 Point Tracking: SQLite database stored at
/data/vouch_points.db
(persistent on Railway) - 🏆 Leaderboard: View top 10 users with most vouch points
- 📈 Individual Stats: Check your own or others' vouch points
- 🚀 Multiplier Mode: Global multiplier (1x default) for boosted vouch events
- 🛡️ Admin Tools: Add/remove points, set/reset multiplier
- 🎉 Celebrations: DM and channel reply when points are awarded
/leaderboard
- Show top users with the most vouch points/vouchpoints [user]
- See your own or another user's vouch points/addpoints @user X
- Admin: add X points/removepoints @user X
- Admin: remove X points/setmultiplier X
- Admin: set global multiplier (>=1)/multiplierstatus
- Show current multiplier/resetmultiplier
- Admin: reset multiplier to 1x
- Go to Discord Developer Portal
- Click "New Application" and give it a name
- Go to "Bot" section and click "Add Bot"
- Copy the bot token (you'll need this later)
- Under "Privileged Gateway Intents", enable:
- Message Content Intent
- Server Members Intent
- Go to "OAuth2" > "URL Generator"
- Select scopes:
bot
andapplications.commands
- Select bot permissions:
- Send Messages
- Use Slash Commands
- Embed Links
- Read Message History
- Copy the generated URL and open it to invite the bot
- Clone this repository
- Install dependencies:
npm install
- Copy
env.example
to.env
and add your Discord bot token:DISCORD_TOKEN=your_bot_token_here
- Run the bot:
npm start
- Push your code to GitHub
- Go to Railway
- Connect your GitHub account
- Create a new project and select your repository
- Add environment variables:
DISCORD_TOKEN
: Your Discord bot tokenDATABASE_PATH
:/data/vouch_points.db
(for persistent storage)PROVIDER_ROLE_ID
orPROVIDER_ROLE_NAME
(one is required for provider check)
- Deploy!
- Picture Detection: The bot monitors all channels with "vouch" in the name
- Image Validation: Checks if uploaded files are images (JPEG, PNG, GIF, WebP)
- Point Award: Automatically awards 1 vouch point per image posted
- Database Storage: Uses SQLite to persistently store user points
- Commands: Users can check their points and view leaderboards
ukeau/
├── index.js # Main bot file
├── package.json # Dependencies and scripts
├── railway.json # Railway deployment config
├── Procfile # Railway process file
├── env.example # Environment variables template
└── README.md # This file
DISCORD_TOKEN
(required): Your Discord bot tokenDATABASE_PATH
(optional): Path to SQLite database file (defaults to/data/vouch_points.db
for Railway persistent storage)
The bot uses SQLite with the following table:
CREATE TABLE vouch_points (
user_id TEXT PRIMARY KEY,
points INTEGER DEFAULT 0,
last_updated DATETIME DEFAULT CURRENT_TIMESTAMP
);
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - feel free to use this bot for your own servers!
If you encounter any issues:
- Check that your bot has the correct permissions
- Ensure the bot token is valid
- Verify the bot is in the correct channels
- Check the console logs for error messages
Made with ❤️ for the Discord community