Skip to content

How to install & configure the discord bot

Mike DeVita edited this page Jul 28, 2023 · 4 revisions

Purpose

To teach You how to install and configure the OnAirDiscordBot on your workstation or server.

Steps

  1. Register a new discord bot with Discord in their developer portal, see this wiki for more info
  2. git clone the OnAirDiscordBot repo to your machine as the discordbot folder
    1. git@github.com:VAMSApp/OnAirDiscordBot.git discordbot
  3. cd into the directory cd discordbot
  4. run npm install inside of the discordbot folder to install node.js packages
  5. copy or rename the config.example.ts file to config.ts
  6. Open the config.ts file in your favorite editor and edit file as needed
  7. ensure to fill out the following fields:
    1. discord token
    2. discord clientId
    3. discord guildId
    4. discord owners - ownerId, obtain in Discord server by copying Server owner's User ID
    5. discord channels - discord server channelId, obtain in Discord by right clicking the desired channel and clicking Copy Channel ID
    6. onair keys:
      1. companyId - OnAir Company Unique ID
      2. vaId - OnAir Virtual Airline Unique ID
      3. apiKey - OnAir Company or Virtual Airline Api Key
      • see this wiki for more info
  8. save the changes made to config.ts
  9. run the bot by typing npm start in a shell prompt.

After a few seconds, the bot should come up and announce itself in the server once it's connected, if not it will abort connection and show an error in the shell console

asciicast

Clone this wiki locally