Answers for "load a config file discordjs"

0

load a config file discordjs

const Discord = require('discord.js');

const bot = Discord.Client();
// config.json 
// {"token": "Your token!"}
// Make sure you saved it in the root directory
// with your main script.
const config = require('./config.json');
const token = config.token;

bot.once('ready', () => {
	console.log('Online!');
})

bot.login(token);
Posted by: Guest on August-21-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language