From 3dedfaca25b88241841d5729cb9df692cac20bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ma=C5=84czak?= <56172798+jakubmanczak@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:48:02 +0200 Subject: [PATCH] fixed lack of correct intents --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index c725d8c..220cb60 100644 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,9 @@ const cfg = require('./cfg.json'); const fs = require('fs'); require('dotenv').config(); -const cl = new Client({ intents: [Intents.FLAGS.GUILDS] }); +const cl = new Client({ + intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES], +}); cl.cmds = new Collection(); const cmdsFls = fs @@ -15,8 +17,6 @@ for (const Fl of cmdsFls) { cl.cmds.set(cmd.name, cmd); } -// FIXME: messageCreate is never invoked for some reason, disabling -// literally all of the bot's functionality cl.on('messageCreate', (msg) => { console.log('a message has been received'); if (!msg.content.startsWith(cfg.prefix) || msg.author.bot) return;