DarkThunder99 / Bot-with-Dashboard

This is a Discord Bot Code with Dashboard Built into it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord Bot with Dashboard

Requirements

  1. Discord Bot Token Guide
  2. Node.js v14.0.0 or Newer
  3. MySQL Database Free MySQL Database
  4. A LOT OF API Keys

๐Ÿ’จ Run the projects

Run on Repl.it Remix on Glitch Deploy

๐Ÿš€ Getting Started

๐Ÿ’ป Installation

To Install Packages needed for the Bot, Go to Console and Type

npm install

or Run the install.bat File

โš™๏ธ Configuration

โš ๏ธ Note: Never commit or share your Token or API Keys Publicly โš ๏ธ

.env config table

.env varriable Description Required
TOKEN The bot token (Remember! The TOKEN is super secret) โœ”๏ธ
PREFIX The default bot prefix (eg. >>) โœ”๏ธ
ID Your Discord Bot ID โœ”๏ธ
AMEAPI Your Amethyste api token โœ”๏ธ
BRAINID Your Brainshop AI Brain ID โœ”๏ธ
MYSQL_DATABASE Your MYSQL Database Name โœ”๏ธ
MYSQL_HOST Your MYSQL Database Host โœ”๏ธ
MYSQL_USER Your MYSQL Database Username โœ”๏ธ
MYSQL_PASSWORD Your MYSQL Database Password โœ”๏ธ
GENIUS Your genius API Key โœ”๏ธ
DOMAIN Your website domain (eg https://example.com)* โŒ/โœ”๏ธ
PORT Your webiste port, (eg. 8008 )* โŒ/โœ”๏ธ
DASHBOARD The Web-Dashboard config value. (eg. true/false, default value: false)* โŒ
SESSION_SECRET The Bot Client Secret (Remember! The SECRET value is Super-Secret)* โŒ/โœ”๏ธ
SECRET The Bot Client Secret (Remember! The SECRET value is Super-Secret)* โŒ/โœ”๏ธ
ANALYTICS Google analytics tracking ID, used in Web-Dashboard โŒ
RECAPTCHA_KEY Google recaptcha v2 key* โŒ/โœ”๏ธ
COOKIES Your youtube cookies โœ”๏ธ
CONTACT_WEBHOOK_ID Your contact form webhook ID โœ”๏ธ
CONTACT_WEBHOOK_TOKEN Your contact form webhook token โœ”๏ธ
STATUS_WEBHOOK_ID Your status webhook ID โœ”๏ธ
STATUS_WEBHOOK_TOKEN Your status webhook token โœ”๏ธ

* = Required to run the web dashboard!

Example .env file

.env.example

# Environment Config

# Required
TOKEN=YOUR_TOKEN_GOES_HERE
PREFIX=>>
ID=YOUR_BOT_ID
AMEAPI=YOUR_AMETHYSTE_API_TOKEN
MYSQL_DATABASE=YOUR_MYSQL_DATABASE_NAME
MYSQL_HOST=YOUR_MYSQL_HOST
MYSQL_PASSWORD=YOUR_MYSQL_USER_PASSWORD
MYSQL_USER=YOUR_MYSQL_DATABASE_USER
BRAINID=YOUR_BRAINSHOP_AI_BRAIN_ID
BRAINKEY=YOUR_BRAINSHOP_AI_BRAIN_KEY
GENIUS=YOUR_GENIUS_API_KEY
CONTACT_WEBHOOK_TOKEN=YOUR_CONTACT_FORM_WEBHOOK_TOKEN
CONTACT_WEBHOOK_ID=YOUR_CONTACT_FORM_WEBHOOK_ID
STATUS_WEBHOOK_TOKEN=YOUR_STATUS_WEBHOOK_TOKEN
STATUS_WEBHOOK_ID=YOUR_STATUS_WEBHOOK_ID
COOKIES=YOUR_YOUTUBE_COOKIES
RECAPTCHA_KEY=YOUR_RECAPTCHA_KEY

# Not required
DASHBOARD=[true/false]
DOMAIN=YOUR_WEBSITE_DOMAIN
PORT=YOUR_WEBSITE_PORT
SESSION_SECRET=YOUR_SESSION_SECRET_(RANDOM_WORDS)
SECRET=YOUR_BOT_CLIENT_SECRET
ANALYTICS=YOUR_GOOGLE_TRACKING_ID
# Note: >> is the default prefix, you can change it later.

โ˜„๏ธ Starting the Bot

Dashboard hosting

If you are Using Replit then Run This Command in Shell to Upgrade your Node Version to Node 14

npm init -y && npm i --save-dev node@14 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH
  1. In .env file set the DASHBOARD config to true and assign the PORT eg. 8080. (See example .env file)
  2. Fill dashboard config in (config.js and .env)
  3. Add the redirect uri here: https://discord.com/developers/applications/YOUR-BOT-ID/oauth2
       https://your-domain.com
       https://your-domain.com/callback
       https://your-domain.com/dashboard
       https://your-domain.com/login
    
  4. Run npm run dashboard in your terminal
  5. If everyting is ok go to your dashboard in browser (eg. to localhost:8000)

Note: See the example .env file below!

Additional info

If you are hosting the site locally it is best to generate certificates for it. If you have them:

  1. Change certs: false & localhost: false values in config.js to true
  2. Place the server.cert & server.key certs in /dashboard/certs/ directory

Open Console and Type

npm start

or You can Run start.bat File to Start the Bot

๐Ÿ“ Features & Commands

Features:

๐Ÿ”ฎ General Commands
๐Ÿคฃ Fun Commands
๐ŸŒŸ Image Processing Commands
๐Ÿ“œ Moderation Commands
๐ŸŽ‰ Owner Commands
โš™๏ธ Utility Commands
  1. Fork the repository
  2. Clone your fork: git clone https://github.com/DarkThunder99/Bot-with-Dashboard.git

๐Ÿ“ Credits

This Bot is Edited Version on Majo Bot

About

This is a Discord Bot Code with Dashboard Built into it

License:MIT License


Languages

Language:JavaScript 87.4%Language:EJS 7.0%Language:CSS 5.2%Language:Shell 0.3%