A Discord bot that integrates with the Hoppie ACARS system for flight simulation. This bot monitors incoming ACARS messages and allows sending messages via Discord.
- 🔄 Real-time Message Polling - Automatically checks for new messages from Hoppie ACARS
- 💬 Discord Integration - Sends received messages to a dedicated Discord channel
- 📤 Send Messages - Send ACARS messages directly from Discord using commands
✈️ CPDLC Support - Send Controller-Pilot Data Link Communications messages- 🔌 Status Monitoring - Check bot and Hoppie connection status
- 📝 Rich Embeds - Messages are formatted as Discord embeds for clarity
- Node.js 16+
- A Discord bot token (create at Discord Developer Portal)
- A Hoppie logon code (register at Hoppie ACARS)
-
Clone or extract the project to your desired location
-
Install dependencies:
npm install- Create a
.envfile based on.env.example:
cp .env.example .env- Edit
.envand add your configuration:
DISCORD_TOKEN=your_discord_bot_token_here
CHANNEL_ID=your_discord_channel_id_here
HOPPIE_LOGON_CODE=your_hoppie_logon_code_here
HOPPIE_CALLSIGN=your_aircraft_callsign_here
POLL_INTERVAL=60000- Go to Discord Developer Portal
- Create a new application
- Go to "Bot" section and create a bot
- Copy the bot token and paste it in
.env - Go to "OAuth2" → "URL Generator" and select:
- Scopes:
bot - Permissions:
Send Messages,Read Messages/View Channels,Embed Links
- Scopes:
- Use the generated URL to invite the bot to your server
- In Discord, enable Developer Mode (User Settings → Advanced → Developer Mode)
- Right-click on the desired channel and select "Copy Channel ID"
- Paste this in
.env
- Visit Hoppie ACARS
- Register or log in to your account
- Your logon code will be displayed in your account settings
npm startOr for development with auto-reload:
npm run dev| Command | Usage | Description |
|---|---|---|
!send |
!send <CALLSIGN> <message> |
Send an ACARS telex message to another aircraft |
!cpdlc |
!cpdlc <CALLSIGN> <message> |
Send a CPDLC (Controller-Pilot Data Link) message |
!status |
!status |
Check bot and Hoppie connection status |
!hoppiehelp |
!hoppiehelp |
Display available commands and CPDLC reference |
Send a telex message to another aircraft:
!send N1234 Hello, how is your flight?
Send a CPDLC message with proper format:
!cpdlc STATION /data2/8030//R/PDC. Cleared to YSSY via KEPPA
Standard CPDLC header structure:
/data2/<msgid>//<direction>/<type>
Components:
/data2/- Data block identifier v28030- Message reference/transaction ID//- SeparatorR/U/D- Direction (Response/Unsolicited/Downlink)
Message Types:
PDC- Pre-Departure ClearanceATC- Air Traffic ControlREQ- RequestINFO- Informational
Example:
/data2/8030//R/PDC. QFA1200 B738 YPPH 0154. CLEARED TO...
Check if bot is working:
!status
- Polling: The bot continuously polls the Hoppie ACARS server at regular intervals (default: 60 seconds)
- Message Reception: When new messages arrive for your callsign, they are automatically posted to the Discord channel
- Message Sending: Discord messages with the
!sendcommand are sent via the Hoppie API - Duplicate Prevention: The bot tracks message IDs to prevent duplicate postings
Adjust POLL_INTERVAL in your .env file to control how often the bot checks for messages:
POLL_INTERVAL=60000 # Check every 60 seconds (in milliseconds)Note: Be respectful to the Hoppie servers. Hoppie API recommends 45-75 seconds, but avoid excessive polling.
Error: Failed to connect to Hoppie ACARS or 404 Not Found
The Hoppie ACARS API endpoints appear to be temporarily unavailable. The Hoppie website indicates they've been restructured and not all content has been restored.
Solutions:
Adjust POLL_INTERVAL in your .env file to control how often the bot checks for messages (default: 60 seconds):
POLL_INTERVAL=60000Note: Be respectful to the Hoppie servers.
Discord Bot Requirements
- ✅ MESSAGE CONTENT INTENT
- ✅ SERVER MEMBERS INTENT (optional but recommended)
- ✅ DIRECT MESSAGE INTENT (optional)
- Failed to connect to Hoppie ACARS
- Verify your
HOPPIE_LOGON_CODEandHOPPIE_CALLSIGNare correct - Check https://www.hoppie.nl/ for service status
- Contact Hoppie support: hoppie@hoppie.nl
- Verify your
DISCORD_TOKENis correct - Ensure the bot has permissions in the channel
- Enable required intents in Discord Developer Portal:
- ✅ MESSAGE CONTENT INTENT
- Ensure the
CHANNEL_IDis correct - Verify the bot has permissions to read and send messages in that channel
- Enable Developer Mode in Discord to copy channel IDs (User Settings → Advanced → Developer Mode)
MIT License
Copyright (c) 2025 Jon Pugh
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For Hoppie-related questions, visit Hoppie's website or contact hoppie@hoppie.nl