Skip to content

E:D Info Bot, features system information finding and other interesting features.

Notifications You must be signed in to change notification settings

rglx/new-ed-info

Repository files navigation

new-ed-info

E:D Info Bot, a Discord bot for Elite: Dangerous groups to perform quick lookups of small pieces of data. Mirrors functions on a bot by Bermos that existed waaaay long ago.

Please read.

Discord's suspicious activities with user data and harsh attitude towards developers on their platform continue to prevent me from mustering the motivation to develop things to enrich their platform with. This project continues under protest of those actions, and as such, could be discontinued at any time.

Updating from v3.x?

Bad news. You've gotta update your nodejs installation and toss your node_modules folder generated by the bot upon installation. Make sure you're on node v17.x before reinstalling everything!

Features

  • System information finder (with station lists, population, government, and travel information)
  • Systems distance finder (with Inter Astra transfer time & carrier travel information)
  • INARA CMDR lookups
  • In-universe clock
  • Open-sourced and auditable by the end user
  • More features coming soon.

Installation

If this is too much horsing around for a single Discord bot, I run an instance of the bot myself. Here's the invite link.

  1. Install basic system utilities

Required system utilities (these are easy to meet)

  • bash or another reasonable shell
  • a terminal multiplexer like tmux, but screen works in a pinch
  • node from nodejs, of version 17 or whatever is marked as Current

You can also use nvm from @nvm-sh to install and contain your nodejs installs without contaminating each other.

You may also want to write a script that runs the bot in a loop in case it crashes because of Discord's API or similar.

  1. Download everything and install dependencies

Very easily done, just clone it, then tell npm to install.

git clone https://github.com/rglx/new-ed-info.git
npm install

This will install the three required libraries that the bot needs to exist, which are:

...as well as their dependencies.

Configuration

  1. Create an application and a bot presence for your bot at Discord's developer applications portal then copy in the token (for the bot user specifically) to the bot's configuration in config.json

  2. You will need to edit the other values in config.json, including the four discord IDs and, if necessary, the location where the bot retrieves icons.

Note: Getting IDs for things requires you to turn on 'developer mode' in Discord, under the Appearance tab of User Settings. With this enabled, most things (channels, servers, users) will have an extra selection in their right-click menu you can get the IDs from.

  1. INARA

So this is kind of a mess. Eventually I'll fix it so that it uses the INARA API instead of all this fuckery. If you don't want to do INARA lookups go ahead and skip this part, the bot will work just fine without it.

  • Create a secondary account on INARA.cz for your bot (or for an alternate Elite: Dangerous account, if you have one)
  • Log out of said INARA account. Completely.
  • Log into the INARA account in a private browsing/incognito window.
  • Open the cookie storage for the site, and copy the esid and elitesheet cookies' contents and put them into config.json in their respective entries.
  • If you log in/out of this INARA account, you will need to repeat this process.
  • If too much time goes by your stored cookies will be marked as invalid and you will need to repeat this process.

Sorry artie, i'll get it updated soon

Operation

  1. Deploy the commands for your bot to listen for from Discord's interactions API using node deploy-commands.js
  2. Start it in a detachable screen/tmux session, using node ed-info-bot.js inside your multiplexer of choice.
  3. Join it to the servers you want it on (by using the url printed to the bot's console)
  4. Configure its permissions for the channel you set in the config.
  5. You're good to go!

Full commands list

  • /system - Retrieves some information about a system via EDSM & (via @Elite-Kode's API) EDDB
  • /distance - Retrieves the distance between two systems from EDSM, and then gives you a bunch of statistics about travelling between them.
  • /whois-inara - Looks up a given user's INARA.cz profile, if it can find it.
  • /restart (by default, debug guild & admin user only) - stops the bot. unless you have a script that restarts it, this won't restart it.
  • /botmanagement (by default, debug guild & admin user only) - allows you to have the bot leave servers, list servers its been joined to, other things like that.

About

E:D Info Bot, features system information finding and other interesting features.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published