Discord operations/training bot for Atlantic Air Operations Command (AAOC).
/ping— bot health/latency check/aaoc— AAOC website link/links— useful AAOC links/training— training pipeline quick links/callsign— quick callsign lookup from the local config/flightnotify— test an operations flight notification- HTTP
/healthendpoint for Railway - HTTP
POST /webhooks/flightendpoint for AAOC website/smartCARS integration
- Create a GitHub repository, for example
aaoc-discord-bot. - Upload/push all files in this folder.
- In Railway, create a project and choose Deploy from GitHub repo.
- Select the repository.
- Add the environment variables from
.env.example. - Deploy.
Do not commit your real .env file or Discord bot token.
Create an application in the Discord Developer Portal, add a bot, and invite it to the AAOC server.
Required bot permissions for this starter:
- View Channels
- Send Messages
- Embed Links
- Use Application Commands
No moderation/admin permissions are required.
Set:
DISCORD_TOKENDISCORD_CLIENT_IDDISCORD_GUILD_ID
The bot registers guild slash commands automatically at startup.
Your AAOC website can send:
POST /webhooks/flight
Authorization: Bearer <AAOC_WEBHOOK_SECRET>
Content-Type: application/jsonExample JSON:
{
"event": "departed",
"callsign": "AAOC101",
"pilot": "Example Pilot",
"aircraft": "F-16C",
"departure": "KMCF",
"arrival": "KHST",
"route": "DCT ... DCT"
}Supported event text can be anything; common values are:
fileddepartedairbornelandedcompleted
Set OPERATIONS_CHANNEL_ID to the Discord channel that should receive these notifications.
Edit src/config.js.
npm install
cp .env.example .env
# fill in .env
npm startThis bot intentionally has no mission-planning or mission-generation commands.
Example:
/airport KMCF
Returns all AAOC airframes assigned to or currently located at that airport, including:
- aircraft type
- tail number
- home base
- current location
- availability/status
Example:
/aircraft F-16C
Returns all matching AAOC airframes fleet-wide, including:
- tail number
- current location
- home base
- status
The current starter reads from data/fleet.json. That can later be replaced by the live AAOC fleet API so the Discord bot and website use the same inventory.
This repository includes railway.json so Railway can read the deployment settings directly from GitHub.
Configured behavior:
- Start command:
npm start - Health check:
/health - Health timeout: 60 seconds
- Restart policy:
ON_FAILURE - Maximum restart attempts: 10
- Uses Railway's injected
PORTautomatically /healthreturns HTTP 200 only after the Discord client is connected
- Create a Railway project.
- Add a service and choose GitHub Repo as the source.
- Select
Im561/aaoc-discord-bot. - Use branch
main. - Railway will detect
package.jsonandrailway.json. - Open Variables and add the secrets/config values below.
- Deploy.
Paste these in Railway's Variables / Raw Editor:
DISCORD_TOKEN=
DISCORD_CLIENT_ID=
DISCORD_GUILD_ID=
OPERATIONS_CHANNEL_ID=
TRAINING_CHANNEL_ID=
AAOC_WEBSITE_URL=https://aaocvirtual.com
AAOC_WEBHOOK_SECRET=
NODE_ENV=production
Do not create a PORT variable unless Railway requires an override. Railway injects PORT automatically.
Once the Railway service source is connected to the GitHub repository, commits pushed to the selected deployment branch can automatically trigger a new Railway deployment.