Create a dashboard for your discord bot (2024)

If you are making a discord bot and looking into providing users with a dashboard you can go two ways. Use a template or code the complete webpage by yourself.

If you do not want to go the second way look no further.

We at Assistants Center provide a NPM package that enables you to create your own custom dashboard in less and 10 minutes!

How to get started?

First of all make sure of have Node.js installed

node -v

If you do not have it installed you can get Node.js here (We recommend the latest LTS)

Setting up your project

To use discord-dashboard, you'll need to install it via npm (which comes pre-installed with Node).

Navigate to a suitable place on your machine and create a folder named whatever you wish!

Opening the terminal

On Microsoft Windows, either:

Shift + Right-click inside your project directory and choose the "Open command window here" option
Press Win + R and run cmd.exe then cd into your project directory
On Apple macOS, either:

Open Launchpad or Spotlight and search for "Terminal"
In your "Applications" folder, under "Utilities", open the Terminal app
On Linux, you can quickly open the terminal with Ctrl + Alt + T.

Initiating a project folder

npm init

Depending on if you want to use a different package manager you can replace npm with yarn or pnpm (Please be aware that we not yet tested bun as there is no stable version for Windows at the time)

This next command creates a package.json file for you, which keeps track of dependencies of your project as well as some other stuff!

It will ask you a sequence of questions, you should answer them as you see fit. If you're not sure on something or want to skip it; leave it blank and press enter.

Once you're done answering the questions, you're ready to install discord-dashboard!

Installing modules

Now that you've installed Node.js and know how to open your console and run commands, you can finally install discord-dashboard and Soft-UI!
Run the following command in your terminal:

npm install discord-dashboard dbd-soft-ui discord.js

Again you can use a different package manager if you want to :)

Setting up Discord-Dashboard

We will be creating a new file, config.json, which will house all our important (and secret) settings! Paste the following code into the file and replace as necessary:

{ "discord": { "token": "discordToken", "client": { "id": "clientId", "secret": "clientSecret" } }, "dbd": { "port": 80, "domain": "http://localhost", "redirectUri": "/discord/callback", "license": "dbdLicense", "ownerIDs": ["Dashboard Admin Discord User IDs"] }}

The configuration above will not work unless you change the values of the properties.

You need to visit https://assistantscenter.com/dashboard to get the free dbdLicense.

Creating index.js

Currently JS and TS are supported while TS is not 100% supported yet but will be in the near future

Create a new file, index.js (or anything you'd like) and paste the discord-dashboard handler into it.

// Define Packagesconst { Client, GatewayIntentBits } = require('discord.js');const SoftUI = require('dbd-soft-ui');const config = require('./config.json');let DBD = require('discord-dashboard');const client = new Client({ intents: [GatewayIntentBits.Guilds] });client.login(config.discord.token);const Handler = new DBD.Handler( /* Keyv storage instance Example: { store: new KeyvMongo('mongodb://user:pass@localhost:27017/dbname') } Can be left empty to use the default storage (Keyv with SQLite) */);(async ()=>{ await DBD.useLicense(config.dbd.license); DBD.Dashboard = DBD.UpdatedClass(); const Dashboard = new DBD.Dashboard({ port: config.dbd.port, client: config.discord.client, redirectUri: `${config.dbd.domain}${config.dbd.redirectUri}`, domain: config.dbd.domain, ownerIDs: config.dbd.ownerIDs, useThemeMaintenance: true, useTheme404: true, bot: client, theme: SoftUI({ storage: Handler, customThemeOptions: { index: async ({ req, res, config }) => { return { values: [], graph: {}, cards: [], } }, }, websiteName: "Assistants", colorScheme: "pink", supporteMail: "support@support.com", icons: { favicon: 'https://assistantscenter.com/wp-content/uploads/2021/11/cropped-cropped-logov6.png', noGuildIcon: "https://pnggrid.com/wp-content/uploads/2021/05/Discord-Logo-Circle-1024x1024.png", sidebar: { darkUrl: 'https://assistantscenter.com/img/logo.png', lightUrl: 'https://assistanscenter.com/img/logo.png', hideName: true, borderRadius: false, alignCenter: true }, }, index: { graph: { enabled: true, lineGraph: false, title: 'Memory Usage', tag: 'Memory (MB)', max: 100 }, }, sweetalert: { errors: {}, success: { login: "Successfully logged in.", } }, preloader: { image: "/img/soft-ui.webp", spinner: false, text: "Page is loading", }, admin: { pterodactyl: { enabled: false, apiKey: "apiKey", panelLink: "https://panel.website.com", serverUUIDs: [] } }, commands: [], }), settings: [] }); Dashboard.init();})();

The above provides a default config with all required parameters. For more parameters and features you can add please consult the Docs

Having issues?

Join the Discord server if you're encountering any issues!
Make sure to give us detailed information on how to reproduce this error and any logs/errors you see in the console.

Create a dashboard for your discord bot (2024)

References

Top Articles
How to Make MAPLE CREAM | 1-Ingredient Recipe by Fresh is Real
The Very Best Gingerbread Cookie Recipe!
Camping World Of New River
Barstool Sports Gif
Craigslist The Big Island
Pobierz Papa's Mocharia To Go! na PC za pomocÄ… MEmu
Rickrolling Link Generator
Quadrilateral Angles Sum Property - Theorem and Proof
Survivor Australia Wiki
Futuretechgirls Contact
Cold War Brainpop Answers
Wlds Obits
Hudson River Regional Conference Inc. · 112-14 107th ave., South Richmond Hill, NY 11419
‘Sound of Freedom’ Is Now Streaming: Here’s Where to Stream the Controversial Crime Thriller Online for Free
Teenbeautyfitness
Parentvue Stma
Syncb Ameg D
Ice Crates Terraria
Aspen Portal Amherst Ny
Cherry Crush Webtoon Summary
Pechins Ad
O'reilly's In Mathis Texas
Naval Academy Baseball Roster
Espn College Basketball Scores
Springfield Ma Craigslist
Jeff Danker Net Worth
27 Sage Street Holmdel Nj
Mark Rosen announces his departure from WCCO-TV after 50-year career
Palmer Santin Funeral Home Fullerton Nebraska Obituaries
Coil Cleaning Lititz
Did Hannah Jewell Leave Wnem Tv5
Unblocked Games 66E
Hmnu Stocktwits
Blue Beetle Showtimes Near Regal Independence Plaza & Rpx
Hingham Police Scanner Wicked Local
Star Wars Galaxy Of Heroes Webstore
Beaufort Mugfaces Last 72 Hours
Bob Wright Yukon Accident
Mcoc Black Panther
Experity Installer
Craigs List Outdoor Furniture
How Much Does Costco Gas Cost Today? Snapshot of Prices Across the U.S. | CostContessa
Busted Newspaper Mcpherson Kansas
Leader of multi-state identity fraud ring sentenced to federal prison
Alvin Isd Ixl
Trinity Portal Minot Nd
Olive Onyx Amora
Myrtle Beach Pelicans Stadium Seating Chart
SF bay area cars & trucks "chevrolet 50" - craigslist
Ds Cuts Saugus
Omni Id Portal Waconia
Four Observations from Germany’s barnstorming 5-0 victory over Hungary
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 5961

Rating: 4.1 / 5 (72 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.