Skip to main content
Do not change these configurations unless you know what you’re doing. Incorrect settings may prevent the webhook from connecting or cause reconnection loops.
Advanced configuration options control the WebSocket gateway connection, reconnection behavior, and logging verbosity.

Gateway connection

gatewayURL
string
WebSocket gateway URL for Sol’s Stat Tracker. The application connects to this gateway endpoint to receive stat notifications and status updates.The gateway authenticates connections using your API token in the WebSocket headers.Default: wss://api.mongoosee.com/solsstattracker/v2/gateway
You should only change the gateway URL if you’re running a self-hosted instance of Sol’s Stat Tracker or if the official gateway URL changes.

Reconnection settings

Control how the application handles connection failures and reconnection attempts.
maxReconnectInterval
number
default:"120000"
Maximum time (in milliseconds) to wait between reconnection attempts. The application uses exponential backoff, starting at 31 seconds and doubling after each failed attempt until reaching this maximum.When a connection closes unexpectedly, the reconnect interval increases: 31s → 62s → 124s → capped at maxReconnectInterval.Default: 120000 (2 minutes)
reconnectOnDuplicateConnection
boolean
default:"false"
Whether to automatically reconnect when receiving a duplicate connection error (code 4003).
  • false (recommended): Stop reconnection attempts when another client is already connected with your token
  • true: Force reconnection attempts even with duplicate connection errors
Default: false
Setting reconnectOnDuplicateConnection to true may cause a reconnection loop if you have multiple clients running with the same token. Only enable this if you’re intentionally trying to take over an existing connection.

How reconnection works

  1. When the WebSocket connection closes, the application checks the close code
  2. For authentication errors (codes 4001, 4002, 4004), reconnection is disabled and the process stops
  3. For duplicate connection errors (code 4003), reconnection only occurs if reconnectOnDuplicateConnection is true
  4. For all other errors, the application waits for the current reconnect interval, then attempts to connect
  5. After each failed attempt, the interval doubles until reaching maxReconnectInterval
  6. On successful connection, the interval resets to 31 seconds
const config = {
    "maxReconnectInterval": 120000,
    "reconnectOnDuplicateConnection": false,
    // ...
};

Logging configuration

verboseLogging
boolean
default:"true"
Controls whether automated status events are logged to console and sent to Discord.When enabled (true):
  • Connection status (connected, reconnecting)
  • Authentication errors (missing token, invalid token, token deleted, duplicate connection)
  • All messages logged to console
  • Status embeds sent to Discord webhook
When disabled (false):
  • Only user-triggered events are logged (enabled, disabled, stat notifications)
  • Automated connection events are not sent to Discord
  • Error messages still appear in console
Default: true

Messages affected by verbose logging

MessageSent when verboseLogging is trueSent when verboseLogging is false
ConnectedYesNo
ReconnectingYesNo
Missing token errorYesNo
Invalid token errorYesNo
Token deleted errorYesNo
Duplicate connection errorYesNo
Enabled (via Discord bot)AlwaysAlways
Disabled (via Discord bot)AlwaysAlways
Stat notificationsAlwaysAlways
const config = {
    "verboseLogging": true,  // Show all status updates
    // ...
};
Console logs always show all events regardless of the verboseLogging setting. This setting only affects which messages are sent to your Discord webhook.

Complete advanced configuration example

const config = {
    // AUTHENTICATION (REQUIRED)
    "token": "YOUR_API_TOKEN_HERE",
    "webhookURL": "YOUR_WEBHOOK_URL_HERE",

    // WEBHOOK USER (OPTIONAL)
    "overrideUsername": null,
    "overrideAvatarURL": null,

    "colors": {
        "success": "#6ab183",
        "error": "#d85a4b",
        "none": "#777f8d"
    },

    "emojis": {
        "success": "<:green_tick:1365702693326422026>",
        "error": "<:red_tick:1365702694727188491>",
        "none": "<:gray_tick:1365702690985738390>"
    },

    // ADVANCED CONFIGURATION (OPTIONAL)
    "gatewayURL": "wss://api.mongoosee.com/solsstattracker/v2/gateway",
    "maxReconnectInterval": 120000,
    "reconnectOnDuplicateConnection": false,
    "verboseLogging": true
};

module.exports = config;

Build docs developers (and LLMs) love