Skip to main content

Installation

caution

UNDER CONSTRUCTION

Clone the repository

If you're new to git, cloning is kind of like downloading.

In your terminal, navigate to where you want to store this, and future, projects. Then, git clone the repository.

git clone https://github.com/kennedy-steve/skylink-if.gitcd skylink-if๐Ÿ˜Š You are now in the skylink-if codebase

Alternatively, you could use VSCode to clone and open skylink-if.

Install dependencies

I like to use yarn for dependency management, but you can use npm if you prefer.

yarn installResolving packages...

Create /config/config.json

The easiest thing to do is contact a maintainer of the project and ask them to create a config file for you. But if you're on your own, follow these instructions:

  1. Create a discord bot
  2. Create a bot token
  3. Get an Infinite Flight Live API Key
  4. Copy the config.example.json file and name it config.json.
  5. Populate all fields named <field> with the appropriate values.

Register /slash commands

Discord slash commands are a new way to create commands for your Discord bot. They are new and Discord has made it clear that they want slash commands to be used as much as possible. You can read more about them here.

yarn run registerINFO: Registering commands: 'dev', 'get-pilot', 'help', 'infinite-flight-status', 'info', 'link', 'register-me', 'test', 'translate'.INFO: Commands registered.Done in 1.23s.

Run the bot

Running the bot isn't just about making it active and listening for commands, it also starts running scheduled jobs such as notifications for active Infinite Flight users.

yarn start:devINFO: Client logged in as 'Skylink IF Beta#3584'.INFO: Scheduled job 'Notify Active Infinite Flight Users' for '0 */1 * * * *'.INFO: Client is ready!

If you want to play with the bot, create a test server and invite your bot to it.