Skip to content

Discord bot that allows to get status updates on your Arma 3 server.

License

Notifications You must be signed in to change notification settings

CreepPork/Apollo

Repository files navigation

Apollo

Discord bot that allows to get status updates on your Arma 3 server.

Status

More Images
  • In case something goes wrong in the bot internals, the following status is displayed.
    Bot failure

  • If the server goes down or is not responding the following message is created and removed once the server goes up. The given role (only roles work) will be pinged.
    Server is down Activity

  • While the bot is gathering or processing information the bot's status is set to typing and it will display in the given channel that it is typing.
    Is typing

  • There are two different commands for updating the current server information: !update and !updateForce (both can be adjusted). Command !update will update the current posted message with the latest information. Command !updateForce creates a new message and removes the old one and posts new information (can be limited to the server manager role to prevent abuse).
    No permissions

  • Locale support - out of the box support for English and Latvian. Easy setup for a new language.
    Latvian locale

  • Maintenance mode is a easy, toggable feature that prevents server down pings from being posted and doesn't poll the server until the mode is toggled again. Maintenance mode embed message Private message when enabled

  • A specific role is available to be pinged when a certain threshold of players is reached. This allows Discord users to get a ping when a configurable amount of players are on the server. Apollo also provides a way of adding these roles via a emoji reaction which assigns and removes the given role. Pinged role threshold is reached

Features

  • Locale support (by default includes English and Latvian)
  • Displays server name
  • Server status online/offline
  • Steam connect address
  • Map
  • Mission name
  • Player count
  • List of players with time hh:mm
  • Refresh timestamp
  • Activity refreshes on shorthand info
  • Handles server not responding
  • Permissions for force command (also takes into account above roles)
    • On permission fail can be customized to return a message in the message channel or direct message to user
  • Mentions a role when server is down
  • Displays when bot is refreshing info
  • Times to refresh before failing and displaying on Discord
  • Sentry error managment
  • Maintenance mode to stop it polling the server unnecessarily without taking the bot down
  • Pings a specific role when a configurable threshold is reached (also provides role assignment via a reaction)

Requirements

  • Node >= 12.x
  • NPM

Upgrade guide to v3

  1. Upgrade your Node.js version to 12.x or above
  2. In https://discord.com/developers/applications/xxx/bot page, enable the toggle SERVER MEMBERS INTENT. This is now required for Apollo to fetch your server users, due to recent API changes.

Setup

  • Get the code
  • npm install
  • cp .env.example .env
  • Configure the .env file
  • npm run build
  • Linux only If you want pm2 support
    • pm2 start pm2.config.js
    • Good to go! Don't run npm start.
  • npm start
  • Good to go!

Adding a new locale

  1. cp src/locales/en.ts src/locales/<language-tag>.ts
  2. Rewrite strings for your locale
  3. Configure LOCALE=<language-tag> to match your new file
  4. npm run build
  5. Done!

Available commands

  • !update to quickly get info about the server status.
  • !updateForce to create a new message about the server status.
  • !maintenanceMode to toggle Apollo's maintenance mode feature.