Dashboard Setup

Place this in your admin config which is located in the theme config and change the key to your own SECURE string.

theme: SoftUI({
  admin: {
    logs: {
      enabled: Boolean,
      key: String,
    },
  },
});

Example Usage

theme: SoftUI({
  admin: {
    logs: {
      enabled: true,
      key: "place your key here!",
    },
  },
});

Image

Bot Setup

Install the NPM package in Bot

Almost done! Place this code into your ready event on the bot.

const DLU = require("@dbd-soft-ui/logs");

client.on("ready", () => {
  DLU.register(client, {
    dashboard_url: String,
    key: String,
  });
});

process.on("unhandledRejection", (reason, p) => {
  DLU.send(client, {
    title: String,
    description: reason,
  });
});

It should look like this, except with your details:

const DLU = require("@dbd-soft-ui/logs");

client.on("ready", () => {
  DLU.register(client, {
    dashboard_url: "https://softui.assistantscenter.com",
    key: "YOURKEYHERE",
  });
});

process.on("unhandledRejection", (reason, p) => {
  DLU.send(client, {
    title: "Unhandled Rejection",
    description: reason,
  });
});

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

Props

dashboard_url
string
required

A String with the url to your dashboard

key
string
required

A String with the secret key from your dashboard