I'm trying to let my bot run a command but I have came across a problem. On line 18 I get the following error: TypeError: Cannot read properties of undefined (reading 'get'). I have tried finding anything about this error on https://discordjs.guide/ and https://stackoverflow.com/ but I can't manage to find anything about this error. Could anyone help me out here?
#Bot can't read client.commands.get()
11 messages · Page 1 of 1 (latest)
• 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.
client.commands is undefined, did you attach a custom property to the client called commands?
Hi, I fixed this issue, I did indeed forgot to define it. However I'm running into a new problem now.
My bot does respond to my !play message and executes the if statements on line 10 and 14 in my play.js file. However when I do !play songname my bot will not join the vc or play a song.
Do you maybe know how I could fix this?
We don’t support either message commands nor TOS violations
may I ask what is against TOS with this ?
YouTube TOS specifically, and by proxy also discord developer TOS
oooh I didnt know about this, i was just following a tutorial so thought it would be okay
Use an up-to-date guide instead of an outdated tutorial to get you up and running
thank you, is there a way to close this thread?
Home: Introduction