incorrect file path

how
No description
21 Replies
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
d.js docs
d.js docs3mo ago
- Websocket intents limit events and decrease memory usage: learn more - See what intents you need here
miai
miai3mo ago
Can you show me what intents are you trying to use?
miai
miai3mo ago
You should have those intents enabled in the application in https://discord.com/developers/applications
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
miai
miai3mo ago
oh so he did not provide any intents got it
soy
soy3mo ago
No description
No description
No description
soy
soy3mo ago
New problem!! Fixed dw
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs3mo ago
:guide: Creating Your Bot: Event handling read more
soy
soy3mo ago
Huh
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
soy
soy3mo ago
The top line?
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
soy
soy3mo ago
So should I remove it?
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
soy
soy3mo ago
I now have a new issue so my bot goes online but it doesn't load commands it doesn't give any errors either yes
d.js docs
d.js docs3mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
soy
soy3mo ago
const { readdirSync } = require('fs'); const { join } = require('path'); const ascii = require('ascii-table'); let table = new ascii("Commands"); table.setHeading("Command", "Load status"); module.exports = (client) => { const commandsPath = join(__dirname, '..', 'commands'); readdirSync(commandsPath).forEach(dir => { const commands = readdirSync(join(commandsPath, dir)).filter(file => file.endsWith('.js')); for (let file of commands) { let pull = require(join(commandsPath, dir, file)); if (pull.structure && pull.structure.name) { if (dir === 'prefix') { if (!pull.run) { table.addRow(file, '❌ -> missing a run method.'); continue; } client.collection.prefixcommands.set(pull.structure.name, pull); } else { if (!pull.run) { table.addRow(file, '❌ -> missing a run method.'); continue; } client.collection.interactioncommands.set(pull.structure.name, pull); client.applicationcommandsArray.push(pull.structure); } if (pull.structure.aliases && Array.isArray(pull.structure.aliases)) { pull.structure.aliases.forEach(alias => { client.collection.aliases.set(alias, pull.structure.name); }); } table.addRow(file, '✅'); } else { table.addRow(file, ❌ -> missing a structure.name or structure property.); } } }); //console.log(table.toString()); } command.js file everything seems fine the bot goes online and no errors THATS THE PROBLEM
soy
soy3mo ago
No description
soy
soy3mo ago
last line I'm a bit new to this so if u can explain in even more simple terms would be greatly appreciated yes