How to Connect Discord to Your FiveM CAD System
Guide to connecting Discord to your FiveM CAD system. OAuth setup, webhooks, and bot configuration.
Why Discord Integration Matters
Discord is the communication hub for most FiveM communities. Connecting your CDE CAD system to Discord creates a seamless experience where members can log in with their Discord accounts, receive real-time notifications about dispatch events, and maintain synchronized roles between the two platforms. This integration reduces friction and increases adoption.
Setting Up Discord OAuth Login
CDE CAD uses Discord OAuth2 for authentication. To set this up, navigate to the Discord Developer Portal and create a new application. Copy your Client ID and Client Secret, then enter them in your CDE CAD community admin settings under the Discord Integration section. Configure the redirect URI as specified in the setup guide.
Configuring Webhook Notifications
Webhooks allow CDE CAD to send real-time notifications to your Discord channels. Create webhook URLs in your desired Discord channels for events like new 911 calls, BOLO alerts, unit status changes, and report submissions. In CDE CAD admin settings, paste each webhook URL and select which events should trigger notifications.
Role Synchronization
CDE CAD can sync department roles with Discord roles. When a member is assigned to a department in the CAD, their corresponding Discord role can be automatically updated. Configure role mappings in the admin panel by matching each CAD department to its corresponding Discord role ID.
Testing Your Integration
After completing the setup, test each integration component. Verify that Discord OAuth login works by signing in with a Discord account. Test webhooks by creating a test dispatch call and confirming the notification appears in your Discord channel. Check role sync by assigning a member to a department and verifying the Discord role updates.