#welcomer command error

8 messages · Page 1 of 1 (latest)

coral hazel
carmine pawnBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

coral hazel
#

it s discord.js 14.9.0

#

pls i am desperate

#

bro no one?

surreal crow
#

Wheres your client constructor? I dont see it in index

coral hazel
#

does it matter?

#

const { Client, GatewayIntentBits, EmbedBuilder, PermissionsBitField, Permissions, MessageManager, Embed, Collection } = require(discord.js);
const fs = require('fs');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
const { MongoClient } = require('mongodb');

client.commands = new Collection();

require('dotenv').config();

const functions = fs.readdirSync("./src/functions").filter(file => file.endsWith(".js"));
const eventFiles = fs.readdirSync("./src/events").filter(file => file.endsWith(".js"));
const commandFolders = fs.readdirSync("./src/commands");

const procces = require('node:process');
process.on('unhandledRejection', (reason, promise) => {
console.log('Unhandleled Rejection at:', promise, 'reason:', reason);
});

(async () => {
for (file of functions) {
require(./functions/${file})(client);
}
client.handleEvents(eventFiles, "./src/events");
client.handleCommands(commandFolders, "./src/commands");
client.login(process.env.token)
})();