Error While loading prefix commands
Greetings Devs and Staff Members I am trying to make some prefix command.
But I am Getting this Error I tried to look at it and to fix it but it didnt worked maybe me you guys can help me out
The code:
The Error I am getting
client.prefix.set(Cmd.name, Cmd)
^
TypeError: Cannot read properties of undefined (reading 'set')
Thank You19 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 did not define client.prefix
I did check the 6th line
client.prefix.set
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Uhm what?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Ahh okh now I get it what you want to say
So i need to define client.prefix right?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Const client.prefix = "s!";
Like that?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Okh
Let me try
Nope still not working, same error
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I just added
client.prefix = "s!";
Above
And change const prefix to client.prefixUnknown User•16mo ago
Message Not Public
Sign In & Join Server To View
But I did give it a prefixFolders
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Okh let me try
GGs The Bot is Running now thanks alot
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Sure Thnx alot once again
i really appericiate it : D