What is DiscordLink?
DiscordLink is a Discord bot designed for Rust gaming communities. It securely links Discord users to their Steam accounts, automates in-game reward distribution, and manages special perks for linked players and server boosters. The bot integrates with Rust servers via RCON and supports multiple servers.
Key Features
- Steam Account Linking: Users can link their Discord and Steam accounts for in-game rewards.
- Booster Perks: Automatically grants and removes special in-game perks for Discord server boosters.
- Role Management: Assigns a custom Discord role to users who link their Steam account.
- Multi-Server Support: Works with multiple Rust servers at once.
- Automated Reminders: Notifies boosters who haven't linked their Steam account.
- Admin Tools: Commands for checking, resetting, and auditing links and perks.
- Secure & Auditable: All actions are logged for transparency and troubleshooting.
How It Works
1. User Links Account:
- Users type /link <steam_id> in the designated Discord channel.
- The bot validates the Steam ID and links it to the user's Discord account.
- The user receives in-game rewards on all connected Rust servers.
2. Booster Perks:
- If a user is a Discord server booster, the bot automatically grants them special in-game perks (e.g., Nitro group) on all servers.
- If a booster stops boosting, perks are removed automatically.
3. Reminders:
- Boosters who haven't linked their Steam account receive periodic reminders (can be disabled).
4. Admin Controls:
- Admins can check, reset, or audit user links and booster perks with slash commands.
Main Commands
- /link <steam_id> – Link your Discord and Steam accounts for rewards.
- /checklink – See your current link and booster status.
- /reminders <on|off> – Enable or disable booster reminders.
- /status – (Admin) Show server and user stats.
- /reset <user> – (Admin) Reset a user's links, perks and cooldowns for changing the SteamID associated with the discord user.
- /checklinks <user> – (Admin) Check a user's linked Steam IDs and booster status.
Configuration
For Server Admins
- Set up the bot using the .env file and follow the install guide.
- Make sure the bot has the right permissions and intents in your Discord server.
- Use admin commands to manage and audit user links and perks.
Environment Variables
The bot uses a .env file for configuration. This file contains sensitive information like API keys and server credentials, so it should never be committed to version control.
Why .env files?
- Security: Keeps sensitive data separate from code
- Flexibility: Easy to configure different settings for development and production
- Standard Practice: Widely used in Python applications and deployment platforms
Configuration Options:
- RCON Timeouts: Configure WebSocket timeouts via `RCON_CONNECTION_TIMEOUT`, `RCON_OPERATION_TIMEOUT`, and `RCON_USERGROUP_TIMEOUT`
- Server Settings: Add multiple Rust servers with `SERVER1_NAME`, `SERVER1_HOST`, etc.
- Discord Settings: Configure roles, channels, and permissions
- Steam Integration: Steam API key for SteamID validation
For Users
- Use /link <steam_id> in the correct channel to get in-game rewards.
- If you boost the server, your perks are managed automatically.
- Use /checklink to see your status or /reminders off to stop reminders.
Support
- For help, check `bot.log` or contact me.