Skip to content

Configuration of the bot

Jetsurf edited this page Nov 6, 2021 · 13 revisions

Config file explanation

{
	"token"		: "",
	"output_to_log" : true,
	"soundsdir"	: "",
	"help"		: "",
	"mysql_host"	: "",
	"mysql_user"	: "",
	"mysql_pw"	: "",
	"mysql_db"	: "",
	"home_server"	: "",
	"hosted_url"	: "https://db-files.crmea.de",
	"web_dir"	: ""
}
  • token: Is the token obtained from the Discord developer portal.

  • output_to_log: If set to true, it the bot will output almost nothing once running, and instead output its log and error log to files in jet-bot/logs If set to false, it will output normally to stdout/err

  • soundsdir: A directory for soundclips to be played with /voice play sound

  • help: The full path of the jet-bot/help folder, is used for !help (will be removed in the future)

  • mysql_*: These are the host/user/pw/db of your mysql setup.

  • home_server: This is your home server that your owners will be obtained from. You are able to invite your bot into more servers, but up to the 100 allowed until you are required to become verified. Your self-hosted bot is not allowed to become verified.

  • hosted_url: The https://fqdn.of.your.host or https://db-files.crmea.de if you would like support for everything but acnh profile pictures. See Webhost for more

  • web_dir: The $WEBROOT with the db-files/* files copied into it, also requires the bot service user has write permissions to $WEBROOT/acprofiles. See Webhost for more

Webhost

For all features to be enabled in the bot, a locally running webhost is needed.

Images for /maps callouts and ACNH profile pictures are only features affected not using this. If you would like /maps callouts functional, but don't care about acnh profile pictures, feel free to use the url: https://db-files.crmea.de in your config for hosted_url, but leave web_dir blank.

  • Webroot Setup

    • Copy jet-bot/db-files/* to root of webserver directory
    • Ensure bot user can write to $WEBROOT/acprofiles
      • Due to NSO endpoints requiring tokens to view images, this is required to make them public
    • Configure webhost to use https, restrict indexing on all dirs (optional)
  • HTTPS Required for discord embeds

    • This is why we we aren't providing a web host with the bot
    • Certbot highly recommended

Tips

The /voice play sounds command requires .mp3 files be used as of now. It is assumed that all files are volume normalized. This is ran on the production sound clips as a starting point to help you

  • find . -name "*.mp3" -exec mp3gain -T -r -d -18dB {} \;

Once Running

After the bot has ran, and has slash commands populated, you can run /owner emotes to define custom emotes to use in embeds and /weapons stats (are used for turf/ranked/league icons and ink turfed badges). If you do not run this, no emote will be shown in place in the embeds that use them.

Clone this wiki locally