A Discord bot that automatically syncs user roles based on product purchases from SourceXchange. When users purchase your products on SourceXchange, this bot can grant them corresponding roles in your Discord server.
- 🔄 Role Syncing - Sync Discord roles based on SourceXchange product purchases
- 📦 Product Listing - View all products a user has purchased
- 🔐 Secure API Integration - Uses SourceXchange API with bearer token authentication
- ⚡ Slash Commands - Modern Discord slash command interface
- 🛡️ Permission Handling - Robust role management with error handling
📖 View Installation Guide - Complete setup instructions available in the Wiki
/products- Shows all products the user has purchased on SourceXchange/sync- Syncs the user's Discord role based on their product purchases
- User purchases a product on SourceXchange with their Discord account linked
- User runs
/synccommand in your Discord server - Bot fetches user's product accesses from SourceXchange API
- Bot checks if user has purchased the configured product
- Bot adds or removes the configured role accordingly
npm run format # Format code with Prettier
npm run format:check # Check code formattingnpm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues automaticallyThe project includes GitHub Actions workflows for:
- ✅ Prettier formatting checks
- ✅ ESLint validation
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE.md file for details.
This bot is not officially affiliated with SourceXchange. Make sure to comply with SourceXchange's Terms of Service and API usage guidelines.