Celeo / staff_up_bot

Discord bot to alert when VATSIM airports have traffic but no controllers
MIT License
2 stars 0 forks source link
deno discord vatsim

staff_up_bot

CI License Runtime

Discord bot to alert when VATSIM airports have traffic but no controllers.

When running, the bot will check pilot positions every 2 minutes and for each configured entry, count the number of pilots within 5 nm of each airport. If the number of pilots within that distance is greater than the threshold, and the airport isn't being covered by an online controller matching the list, then a simple text message is sent to the Discord channel, specifying the airport, the number of pilots nearby, and the threshold.

Installing

From binary

Get a binary from the repo.

From Source

  1. Install Deno
  2. Install just
  3. Clone the repo
  4. Build with just compile

Using

  1. Copy the config.example.json file to config.json and populate
  2. Run the binary

Configuration

Fields

Example config

{
  "token": "abc123",
  "channel": "456789",
  "alerts": [
    {
      "airport": "KSAN",
      "trafficThreshold": 10,
      "coveringPositions": ["SAN_.*TWR", "SAN_.*APP", "SCT_.*APP", "LAX_.*CTR"]
    },
    {
      "airport": "KLAX",
      "trafficThreshold": 10,
      "coveringPositions": [
        "LAX_.*TWR",
        "LAX_.*APP",
        "LAX_.*DEP",
        "SCT_.*APP",
        "LAX_.*CTR"
      ]
    },
    {
      "airport": "KLAS",
      "trafficThreshold": 10,
      "coveringPositions": ["LAS_.*TWR", "LAS_.*APP", "LAX_.*CTR"]
    }
  ]
}

License

Contributing

Please feel free to contribute. Please open an issue first (or comment on an existing one) so that I know that you want to add/change something.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.