48 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!you forgot to export data
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
lmao
jinx
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
weird. i can see myself typing on the members list
I'm pretty sure my execute function is in an another file
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
what-
if you are not exporting it from your command file, itll return undefined
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
¯\_(ツ)_/¯
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
as far as i understand the file i gave you is the command and the other files i made are subcommands
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
info and user that is
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
i think you should learn a bit more about discord.js and nodejs itself ...
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
I did use nodejs a bit in the past
But I never had to do anything this advanced
yeah then learn a bit more
and read and understand the guide fully tbh
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
i got used to esm that i find this a bit uneasy for me 😭
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
How do I even define it when the execute is in another file?
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
Do I just
module.exports = { execute }
?You need to export both execute and data. Execute should be a function
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
I just did whatever it told me to do in the guide if I recall correctly
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
I'm pretty sure I cloned the example directory
Don't get me wrong, I've read it
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
despite it being messy is it just not possible to cram everything that the bot needs into a single file
like you can do with discord.py
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
like commands and everything everything in a single file
It is
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
just know its nearly impossible to debug then, theres a reason the guide uses handlers
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
are you gonna scroll through multiple hunderds of lines of code to find an issue?
i wont
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
My discord py bot has like 500 lines of code and I had no issues whatsoever
anyhow, the guide is really clear and should easily be understanded if you have a basic knowledge about js
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
I hope discordjs had similair functionality as I dislike pay and I know js better
djs has no such functionality. js does
djs is a js library
You can code however you want if you know javascript well
Single file multi file, it doesn't really matter