Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.45 KB

File metadata and controls

40 lines (29 loc) · 1.45 KB

BotDash.pro

First you will want to go to https://botdash.pro

Then Go to account --> Login

Login

When you have logged in go to the dashboard create a New project

NewProject

Go to vscode rep.it glitch.com npm i discord.js npm i botdash.pro

Heres a Starter code

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
var dashboard = ""; //Declare variable
client.login("--- DISCORD BOT TOKEN ---"); //Login to the bot client
client.on('ready', () => { //Client is ready
    console.log("ready"); //print messageclient
    dashboard = new botdash.APIclient("--- BOTDASH TOKEN ---"); //Connect to botdash with a discord.js 
});
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 
    }
});

How to Get a api token go to actions settings and grab the api token

APITOKEN