Problems with the Export of modules in v14
Only one Funktion is getting executed and the other not, what can i do?
12 Replies
- 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.
- Issue solved? Press the button!show how you define client.commands
bot.commands = new Discord.Collection();
and how do you fill that with commands
Its all on the first photo
your code expects your command file to export an object, not an array of objects
How can i fix that?
either export an object or adjust your code to handle arrays of objects
The file Name of the file is in this case not important, because the command handler looking for the name inside the export funktion
Do you have an idea how I can adjust it to handle arrays of objects?
Maybe anyone other?
I want to group the commands in File, because i think its looks nicer and cleaner
try separate 1 file = 1 command
I thought
Discord.Collection
was deprecated
oh. k nvm