Skip to main content

Discord Integration

Backoffice path: backoffice/settings/discord

Available to roles: System Administrator, Administrator

Overview

The Discord Integration connects your Airspace tenant to a Discord guild (server), enabling automated announcements, staff communication channels, and optional pilot account linking. This integration uses the Airspace bot to interact with your Discord server on behalf of your airline.

Initial Setup

To connect your airline to a Discord server:

  1. Navigate to backoffice/settings/discord.
  2. Click the Connect (or Authorize) button to begin the OAuth authorization flow.
  3. You will be redirected to Discord to authorize the Airspace bot to join your guild.
  4. Select the Discord server you want to connect and grant the requested permissions.
  5. After authorization completes, you are redirected back to the backoffice and the integration is linked.

The bot must have sufficient permissions in your Discord server to read channels, send messages, and manage roles as needed.

Configuration

Once the bot is connected to your guild, configure the following options:

Announcements Channel

Select a channel from your guild's channel list where the bot will post automated announcements. Messages posted to this channel include:

  • New tenant alerts -- Notifications relevant to your airline's operations
  • Contact form submissions -- When someone submits a contact form, the message is relayed to this channel

Staff Channel

Select a separate channel designated for staff-only communications. This channel is intended for internal operational messages visible only to your administrative team.

Active Status

Toggle the integration on or off. When deactivated, the bot remains connected to your guild but stops sending messages and processing events. Reactivating it resumes normal operation without requiring re-authorization.

Disconnect

Click the Disconnect button to fully unlink the Airspace bot from your Discord server. This removes the guild association from your tenant. To reconnect, you must go through the OAuth authorization flow again.

Test Messages

After configuring your channels, use the Test Message buttons to verify that the bot has the correct permissions to post in each selected channel.

  • A test message is sent to the chosen channel.
  • If the bot lacks the required permissions (e.g., Send Messages, Embed Links), a specific error message is displayed in the backoffice indicating which permission is missing.
  • Resolve any permission issues in your Discord server settings before relying on the integration for production use.

Notification Channels

Backoffice path: backoffice/settings/discord (scroll to "Notification Channels" card)

In addition to the main announcements and staff channels, you can configure dedicated channels for specific notification types:

Flights Channel

Receives real-time notifications when pilots start and complete flights. Each notification includes the pilot's name, route, aircraft, flight number, landing rate (FPM), and landing G-force (if available from the ACARS client).

Spotters Channel

Receives a notification whenever a spotter photo is approved by staff, including the photo image, subject (aircraft registration or airport ICAO), and photographer name.

Daily Rankings Channel

Receives an automated daily leaderboard showing the top 3 pilots by points, flights, hours, and landing G-force for the past 24 hours, followed by month-to-date (MTD) top 3 in the same categories. The G-force ranking orders pilots by proximity to the configured G-force target (see Settings > Rankings).

Alternates Channel

Receives staff alerts when a pilot declares an alternate (diversion) during a flight. Includes the original route, diversion airport, aircraft, and reason.

Test Notification Buttons

Each notification channel has a small test button (paper-airplane icon) next to its channel selector. Clicking it sends a sample embed to the selected channel so you can verify the bot has the correct permissions before enabling the notification in production. The new-user notification toggle also has a test button that posts a sample "New Pilot Registered" embed to the announcements channel.

Notification Toggles

Each notification type can be independently enabled or disabled:

SettingDescriptionDefault
Flight NotificationsSend embeds when flights start and completeOff
Spotter NotificationsSend embeds when spotter photos are approvedOff
Daily RankingsPost daily top pilot rankingsOff
Daily Rankings HourUTC hour (0-23) when daily rankings are posted0
Alternate NotificationsAlert staff when pilots declare alternatesOff
New User NotificationsPost to announcements channel when a new pilot registersOff

Monthly Rankings

Backoffice path: backoffice/settings/discord (scroll to "Monthly Rankings" card)

The Monthly Rankings feature lets you manually send a rankings message to your announcements channel for any specific month. This is useful for:

  • Re-sending a rankings message that failed or was missed
  • Sending rankings for a past month on demand

To use it:

  1. Select the Month and Year from the dropdowns.
  2. Click Send Rankings.
  3. A rich embed with the top 5 pilots by points, flights, hours, and landing G-force for that month will be posted to your announcements channel.
note

Rankings are also sent automatically on the 1st of each month at 12:00 UTC for the previous month. The manual trigger is an additional option, not a replacement.

Tenant Discord Join

Pilots can join your airline's Discord server directly from their settings page. This provides a seamless onboarding experience:

  1. Navigate to Settings > Discord in the pilot portal.
  2. If the airline has an active Discord integration with a configured guild, pilots see a Join Server button.
  3. Clicking the button initiates an OAuth flow with the following scopes:
    • identify -- Allows the platform to read the pilot's Discord username and ID.
    • guilds.join -- Allows the bot to add the pilot to your airline's Discord server automatically.
  4. After authorization, the pilot is added to the guild and assigned the configured pilot role(s).
  5. The pilot's Discord enrollment is stored in their user record.

Once enrolled, pilots can view their connection status and leave the server from the same settings page.

Pilot Role Assignment

When configuring the Discord integration, administrators can specify one or more Pilot Role IDs. These Discord roles are automatically assigned to pilots when they join through the tenant join flow. This allows airlines to distinguish VA-enrolled members from other guild members.

note

Discord user IDs are stored encrypted in the database to protect pilot privacy. The platform does not store Discord passwords or access tokens beyond what is required for the OAuth flow.

Auto-Kick Unenrolled Members

System setting: DiscordAutoKickUnenrolled (under Discord module)

When enabled, the system periodically checks your Discord guild for members who were not enrolled through the VA system (e.g., users who joined directly via an invite link). These unenrolled members are automatically removed from the guild, with the following safety protections:

  • Bot accounts are always skipped.
  • Members with roles beyond the configured pilot roles are skipped -- this protects staff, moderators, and anyone with elevated permissions.
  • Only members whose roles are a subset of the pilot roles (plus @everyone) are eligible for removal.

This setting defaults to Off and can be toggled from Settings > System Settings under the Discord module.

Guild Role Management

The bot can manage guild roles for staff members in your Discord server. This enables automatic role assignment based on a user's Airspace role, keeping your Discord server's role structure in sync with your airline's staff hierarchy.

Permissions

Managing the Discord integration requires the System Administrator or Administrator role. The configuration is part of the settings module and follows the same permission model as other system settings.