#Collection Error
8 messages · Page 1 of 1 (latest)
Fix this code const { Client, GatewayIntentBits, Discord } = require('discord.js'); to const { Client, GatewayIntentBits, Collection } = require('discord.js'); and fix client.commands = new Discord.Collection(); to client.commands = new Collection();
it will work then
you have to add const fs = require('node:fs') at the start of the code
This will be helpful
djs has GatewayIntentBits.MessageContent intent for that
client.on('message', message =>{ this code has to be changed to client.on('messageCreate', message =>{