Access the Discord Bot Dashboard v2 website
mainThe live dashboard and website for this project can be accessed at the following URL:
https://dbd.lachlan-dev.comrepository·main·Indexed 42 days ago
https://github.com/lachlandev/discord-bot-dashboard-v2A web-based dashboard designed to simplify Discord bot development, allowing users to manage applications through a modern UI without writing extensive code. Version 1.0.0 supports custom plugin creation via a specific run/details schema, custom CSS themes, and includes built-in commands such as ban, kick, clear, and ping. Requires Node.js (v20.16.0 recommended) and configuration of OAuth2 Redirect URIs and Privileged Gateway Intents in the Discord Developer Portal.
The live dashboard and website for this project can be accessed at the following URL:
https://dbd.lachlan-dev.comOnce the dependencies are installed and config.json is configured, start the application from the root directory using Node.js. After starting, the dashboard will be accessible via your web browser at the port specified in your configuration (default is http://localhost:3000).
node index.jsTo install the project, download the latest version from the Releases page, navigate to the root directory, and use npm to install the dependencies.
Requirements:
npm installTo install the project, download the latest version from the GitHub Releases page, navigate to the root directory, and use npm to install the dependencies.
npm installTo create a custom theme, you must start with the existing default.css file as a template.
default.css file within the themes folder of your application installation. If it is not available locally, you can download it from the official repository.default.css and rename it to a unique filename to avoid conflicts with other community themes.# Example: Creating a copy of the default theme via CLI
cp src/themes/default.css my-custom-theme.cssOnce you have created your custom CSS file, follow these steps to apply it to your dashboard:
Before running the application, you must set up your configuration file:
config folder.config.default.json to config.json.Important OAuth2 Setup:
You must specify a Redirect URI in the Discord Developer Dashboard. The URI used in your config must exactly match the one registered in Discord. For local development, use:
http://localhost:1337/login/api
Privileged Intents: Ensure you enable "Privileged Gateway Intents" in the Discord Developer Dashboard to prevent errors with commands like "Kick" or "Ban".
{
"clientID":"BOTclientID",
"clientSecret":"BOTclientSecret",
"callbackURL":"http://localhost:1337/login/api",
"Admin":["userAdminID"],
"token":"BOTtoken",
"prefix":"-",
"port":"3000"
}After installation, you must initialize your configuration file.
config.default.json file in the config folder.config.json.{
"clientID":"BOTclientID",
"clientSecret":"BOTclientSecret",
"callbackURL":"http://localhost:1337/login/api",
"Admin":["userAdminID"],
"token":"BOTtoken",
"prefix":"-",
"port":"1337"
}To create a plugin for Discord BOT Dashboard, you must follow a specific code structure that exports two main properties: run and details. The run function contains the logic executed when the plugin is triggered, while the details object provides metadata used by the dashboard to display information about your plugin.
module.exports.run: A function that accepts (client, message, args). This is where your command logic resides.module.exports.details: An object containing the following keys:name: The display name of the plugin.author: The creator's identifier.icon: A URL pointing to the plugin's icon.description: A brief explanation of what the plugin does.usage: A string showing how to use the command (typically including the bot's prefix).// Requirements
const discord = require ("discord.js");
// Required display prefix
const prefix = require('../config/config.json')
// All the code for you Plugin goes inside here
module.exports.run = (client, message, args) =>{
message.channel.send ('pong!')
}
// IMPORTANT Allows DBD to know details about your Plugin
module.exports.details = {
name:'Ping',
author:'LachlanDev#8014',
icon:'URL',
description:'ping command description',
usage:`${prefix.prefix}ping`
}To update to a newer version of Discord BOT Dashboard, follow these steps:
npm install to ensure all requirements are met.config folder in your old installation's root directory.config folder into the config folder of the new installation.commands folder from your old installation to the new one.Once completed, your BOT Settings and previously configured plugins should be functional in the new version.
npm installThe dashboard is built using an Express server integrated with Socket.io to provide real-time updates from the Discord bot.
The server establishes a WebSocket connection via Socket.io. Once a client connects, the server emits an uptime event every second. This event contains a formatted string representing the Discord bot's current uptime (e.g., 0d 1h 2m 3s).
./config/config.json../public and ./themes directories.process.env.SESSION_SECRET if provided; otherwise, it generates a random 32-byte hex string.ejs for templating.// Client-side listener for real-time uptime updates
const socket = io();
socket.on('uptime', (data) => {
console.log('Bot Uptime:', data.uptime);
});