README
BotDash.pro
Get started making amazing discord bot dashboard's. You're just one click away
Get Started (Discord.JS)
- Create an acount on https://botdash.pro/premium
- Create your first project.
- Go to the editor and add your first category
- Create your first setting (Set database storage ID to "botprefix" so the example will work without much changes)
- Return to your admin dashboard
- Go to settings and copy the API token to somewhere safe.
- Copy the code below and change bot token with your discord bot token and api token with the API token you just saved somewhere safe.
- In the admin dashboard turn Maintenance to off.
Enjoy
const botdash = require('botdash.pro'); //Require botdash.pro
const discord = require('discord.js'); //Require Discord.JS
const client = new discord.client(); //Create a discord bot client
client.login("BOT TOKEN HERE"); //Login to the bot client
client.on('ready', () => { //Client is ready
console.log("ready"); //print message
const dashboard = new botdash.APIClient("YOUR API TOKEN HERE"); //Connect to botdash with a discord.js client
});
client.on('message', async function(message) { //Discord message recieved
const prefix = await dashboard.getVal(message.guild.id, "botprefix"); //Get a value
if (message.content == `${prefix}ping`) { //Simple ping command with customizable prefix
message.channel.send('pong'); //Send pong back
}
});