forked from shitcorp/discord-bot-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
25 lines (19 loc) 路 840 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*****
* This test file is only temporarily.
* It is here just to test the basic functionality.
*/
const dashboard = require("./index");
const Discord = require('discord.js');
const chalk = require('chalk');
require('dotenv').config(); // Create a .env file or include your own config file
// Create an instance of a Discord client
const client = new Discord.Client();
const oAuth = Discord.OAuth2Application;
// const { OAuth2Application } = require('discord.js');
// Ready event of the Client
client.on('ready', () => {
dashboard.run(client, { port: 4000, clientSecret: process.env.CLIENT_SECRET, redirectURI: process.env.REDIRECT_URI}, oAuth);
console.log('INFO >> ' + chalk.green('Bot is online'));
})
// Log our bot in using the token from https://discordapp.com/developers/applications/me
client.login(process.env.TOKEN);