Dashboard Setup

Place this code into the theme config and change the key to your own SECURE string.

shardspage: {
    enabled: true,
    key: "place your key here!",
},

Bot Setup

Install the NPM package on your Sharding Manager

Almost done! Place this code into your ready event on the Sharding Manager or if using discord-hybrid-sharding, after spawning the clusters.

const DSU = require("@dbd-soft-ui/shards");

DSU.register(manager, {
  dashboard_url: "your domain",
  key: "your key",
  interval: 15,
});

It should look like this, except with your details:

const DSU = require("@dbd-soft-ui/shards");

DSU.register(manager, {
  dashboard_url: String,
  key: String,
  interval: Number,
});

If you want to adjust the interval of stats posting, just simply change the interval to as many seconds as you want.

And we are done! Now just restart your dashboard and bot then the stats collection will begin.

Image

Props

shardspage
Object
required
enabled
boolean
required

Indicate if the shardspage should be enabled

key
string
required

The secret key from your dashboard

register
Object
required
dashboard_url
string
required

The url of your dashboard

key
string
required

The secret key from your dashboard

interval
number
required

The interval in seconds