From d722add09bdd72bbe5bc5b9c40aaf86e68963be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hor=C3=A1=C4=8Dek?= Date: Mon, 30 Mar 2020 10:52:08 +0200 Subject: [PATCH] More comments and also comment stuff out --- index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 2064413..b3f3e69 100644 --- a/index.js +++ b/index.js @@ -26,11 +26,16 @@ require('dotenv').config() const Discord = require('discord.js') const client = new Discord.Client({ disabledEvents: ['TYPING_START'] }) -client.commands = new Discord.Collection() -client.aliases = new Discord.Collection() +//client.commands = new Discord.Collection() +//client.aliases = new Discord.Collection() + +// Command cache containing every prefix + command combination without arguments ( ~ping ) +client.commandCache = {}; // Initialization function const init = async () => { + // Load modules + // Register events fs.readdir('./events', (err, files) => { files.forEach(file => { @@ -38,6 +43,8 @@ const init = async () => { }); }); + // Load commands + // Login into Discord client.login(process.env.TOKEN); }