Skip to main content
Version: Next

Configuration

Before anything else, head over to your bot config and enable the API server.

Client

  1. Copy the .env.example
  2. Fill in all the variables
info

You can find your bot's secret in your Discord Developer Portal. Click on your application and then go to the OAuth2 tab. You will find it under the Client Secret section.

  1. Go on your Discord Developer Portal
  2. Click on your application
  3. Go to the OAuth2 tab
  4. Add the following redirect URIs:
    • http://localhost:3000/api/auth/callback/discord
    • <your_domain>/api/auth/callback/discord (if you are running the app on a domain in production)
  5. Copy the Client Id and the Client Secret
  6. Paste them in the .env.example file, as well as your bot API admin token.
  7. Rename the file .env
  8. Go to the src/core/config/bots.ts file
  9. Fill in your bot info (here is a sample)
        {
    id: '943804890143133736',
    name: 'TSCord',
    iconUrl: 'https://cdn.discordapp.com/avatars/943804890143133736/c08ad02818b89d43210a232094b32215.webp',
    apiUrl: process.env['TSCORD_API_URL']!,
    apiToken: process.env['TSCORD_API_TOKEN']!,
    secret: process.env['TSCORD_SECRET']!
    }
    tip

    As you may have noticed, the bots config is an array, so you can setup multiple bots!

  10. Run npm run build
  11. Then, run npm run start