Skip to content

Configuration

Brandyn Abel edited this page Mar 3, 2024 · 7 revisions

Configuring TS-Disc-Control

Configuring ts-disc-control has several required parameters and a few optional ones. Find the descriptions below and a sample file with all settings including those which are optional

Config Secion Config Name Default Value Required purpose
sqlite filename database.sqlite3 yes The filepath to the sqlite database file used to store registration information
discord token yes The discord api token used to authenticate the bot from the developer poral
discord guild yes The discord server Id (enable developer mode in discord client and right click server and copy id)
discord clientID yes The OAuth ClientID for your bot from the discord developer poral
discord clientSecret yes The OAuth ClientSecret for your bot the discord developer poral
discord useOAuth true No Use the /register command instead of oAuth to register clients, this will send a message instructing the user to use the /register slash command with their teamspeak identity id to connect their discord identity to their discord user
discord commandChannelName No When useOAuth is false the message sent will direct the user to use this channel to run the command (the bot listens to all channels but this will help avoid noise in other channels )
teamspeak host Yes
teamspeak queryport Yes
teamspeak virtualServerId Yes
teamspeak username Yes
teamspeak password Yes
teamspeak welcomeMessageText Hello! You seem to be new here. Please connect your discord account by logging in with the link below. No
discord port Yes The port the bot will listen for web requests on (mostly used for oAuth
discord baseUrl Yes The address the bot will listen at (ex. https://bot.techy.systems )
discord clientBaseUrl Yes The address the bot will ask the client to start the auth session at (Use this with a proxy or re-direct which includes query params to use your existing website with the bot at a different host address if you don't have access to make a separate domain or subdomain for the bot (Advanced Configuration)
discord oAuthRedirect Yes the path the bot will accept redirects from discord (usually leave this at /redirect unless you have some reason to change it and know what you are doing
discord loginUrl Yes Use this with the clientBaseUrl to set the path on your website your client will start at if you can't redirect from the base url (Advanced Configuration)
{
  "sqlite": {
    "filename": "database.sqlite"
  },
  "discord": {
    "token": "",
    "guild": "",
    "clientID": "",
    "clientSecret": "",
    "useOAuth": false,
    "commandChannelName": "bot-commands"
  },
  "teamspeak": {
    "host": "wc147.teamspeak3.com",
    "queryport": 10011,
    "virtualServerId": "1751",
    "username": "",
    "password": "",
    "welcomeMessageText": "Test Message."
  },
  "web": {
    "port": 8090,
    "baseUrl": "",
    "clientBaseUrl": "",
    "oAuthRedirect": "/redirect",
    "loginUrl": "/login"
  }
}```
Clone this wiki locally