discord js help

Solutions on MaxInterview for discord js help by the best coders in the world

showing results for - "discord js help"
Nicole
02 Sep 2019
1const Discord = require('discord.js')
2require('dotenv').config();
3const bot = new Discord.Client();
4const token = 'ODE0NzA1NzQzOTczMzE4NzA2.YDhv2Q.5WtTxRrG-tFzqPUCo4HY30wqLcY';
5
6bot.commands = new Discord.Collection();
7bot.events = new Discord.Collection();
8
9['command_handler', 'event_handler'].forEach(handler => {
10    require(`./handlers/${handler}`)(bot, Discord);
11})
12
13bot.on('ready', () => {
14
15    bot.user.setActivity('+help', { type: "LISTENING" }).catch(console.error);
16    this.bot.user.setStatus('dnd');
17})
18
19bot.login(process.env.DISCORD_TOKEN);