Command not found, when it's clearly found
So the commands I have are "ping" and "pong", but when I run the commands, it does nothing.
![No description](https://cdn.answeroverflow.com/1145789295655923782/image.png)
![No description](https://cdn.answeroverflow.com/1145789295886598194/image.png)
![No description](https://cdn.answeroverflow.com/1145789296134066216/image.png)
![No description](https://cdn.answeroverflow.com/1145789296352178346/image.png)
4 Replies
- 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!are you running index?
sounds like your command files aren't being properly read and set in
<Client>.commands
const commandsPath = path.join(__dirname, 'cmds');
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
commandFiles
would be an array of files directly in the cmds
folder with the extension js
you don't have any js files directly in cmds