Dashboard Setup

Overview

The Aegis Bot dashboard provides a powerful interface for managing your Discord bot. This guide will walk you through the setup and configuration process.

Prerequisites

Before configuring the dashboard, ensure you have:

  • Node.js installed (v21.7.3)

  • Access to your Discord server with administrator permissions

Basic configuration

Step 1: Discord application setup

1

Discord Developer Portal

  1. Go to the Discord Developer Portal.

  2. Select your application (Bot).

  3. Navigate to the OAuth2 section.

  4. Add a redirect URL:

  • For production: http://IP:PORT/api/auth/callback

  • For local development: http://localhost:PORT/api/auth/callback

Make sure to replace IP & PORT with actual values.

  1. Copy your Client ID and Client Secret from the OAuth2 page.

2

Dashboard Configuration

In your dashboard.yml file, configure the following settings:

dashboard.yml
Dashboard:
  Enabled: true
  ClientID: "YOUR_CLIENT_ID"
  ClientSecret: "YOUR_CLIENT_SECRET"
  Url: "http://IP:PORT" # Use http://localhost:PORT for local development
  Port: 7000
  Auth:
    JWTSecret: "YOUR_SECURE_JWT_SECRET" # Make sure this is at least 32 characters long

Replace the placeholders with your actual values:

  • YOUR_CLIENT_ID: Your Discord application's Client ID

  • YOUR_CLIENT_SECRET: Your Discord application's Client Secret

  • YOUR_SECURE_JWT_SECRET: A secure random string for JWT token encryption

3

Permissions Configuration

Configure role-based access control in your config.yml:

config.yml
Permissions:
  Dashboard:
    Login: ["ROLE_ID_1", "ROLE_ID_2"] # Roles that can access the dashboard
    Usage: ["ROLE_ID_1"] # Roles that can view analytics
    Settings: ["ROLE_ID_1"] # Roles that can modify settings
    Embed: ["ROLE_ID_1"] # Roles that can use the embed builder
    Suggestions: ["ROLE_ID_1"] # Roles that can manage suggestions

Note: Login and dashboard pages won’t be available if roles are not configured.

Advanced configuration

You can customize the dashboard's navigation menu through the settings page:

1
  1. Access the dashboard settings.

  2. Navigate to Navigation Settings.

  3. Add custom links with:

  • Name: Display name

  • URL: Target URL

  • Icon: FontAwesome icon name

  • External: Toggle for external links

2

Appearance Settings

Customize the dashboard's appearance:

  1. Access dashboard settings.

  2. Navigate to Dashboard Settings.

  3. Configure:

  • Navigation Name: Brand name in the sidebar

  • Tab Name: Browser tab title

  • Favicon: Custom favicon URL

Security considerations

JWT secret

  • Use a strong, random string for JWTSecret.

  • Minimum recommended length: 32 characters.

  • Keep this secret secure and never share it.

Common issues

Cannot Access Dashboard
  • Verify the correct port is open.

  • Check if the Discord application OAuth2 settings are correct.

  • Ensure the user has the required role.

Authentication Errors
  • Verify ClientID and ClientSecret are correct.

Important: If you receive AuthError: Authentication failed your client ID or secret is incorrect.

  • Check if the redirect URL matches exactly.

  • Ensure JWTSecret is properly set.

  • Ensure that the URL has no trailing slash, e.g. use http://localhost:3000 not http://localhost:3000/.

Example: URLs should always be filled in as Url: "http://localhost:3000" and not "http://localhost:3000/"

Permission Issues
  • Verify role IDs are correct.

  • Check if roles are properly assigned.

  • Ensure the bot has necessary permissions.

Notes

  • Replace placeholders (Client ID, Client Secret, IP, PORT, JWT secret) with your actual values when configuring files.

Last updated