-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'client' of undefined #8
Comments
I've never seen this error so I researched a bit, this is not a code error.
|
I've had the same issue tried both of your solutions but now I've got this error https://sourceb.in/7bf522532c are you able to help me? |
@CaptainYannick Have you installed Commando and discord.js v12 correctly? |
@galnir Yes I have those versions |
@galnir I fixed it forgot to install discord.js master |
@JamesGW-iOS What about you? |
I am also having the same error as @CaptainYannick but no matter how many times I try to install discord.js master, I still get the same error. |
@Beastskyler Did you install Commando correctly? |
I got version 0.10.0. Also, if I uninstall both discord.js and commando, I can get my bot run but then if I run the play command, I get TypeError: Cannot read property 'client' of undefined. So I reinstall both discord.js and commando.js and I get TypeError: Cannot read property 'extend' of undefined. |
@Beastskyler Did you clone the repo or did you copy the music commands? |
Copy |
Your command is the only good one I could find that would go with my bot. |
So you probably didn't create an instance of CommandoClient in your index.js if you didn't use Commando before. Take a look at my index.js file |
Commando is a framework, so if you wish to use it you need to register command groups and stuff like that. Take a look at its docs I recommend you to use it, makes writing commands wayy easier |
This is what I have in my Index.js, I have my token in I it becasue every time I try to use a config.json, I can never get it to work. |
I have used commando for all of my commands |
Add me on discord - hyperzone#1185 |
Beastskyler's issue was a var naming issue |
Will reopen if you still have this |
still got this |
@painownage1 got what? Did you install the dependencies correctly? |
Personnaly, I have this error: |
@Luunyx Then you didn't install discordjs or Commando correctly, did you clone this repo or copy code? |
No I fully use my own bot, I not copied this |
@Luunyx You probably have discordjs v11 installed and not v12. What do you mean use my own bot? Did you even clone this repo? If you did, all you need to do is follow the instructions and it will work |
TypeError: Cannot read property 'client' of undefined |
I resolved this error updating my NPM and my Discord.JS. Try it in your terminal: it may take between 5 and 15 minutes |
Also, I downloaded something called cheerio and request packages if that has anything to do with it. |
That is really weird. |
what do it do? (cheerio) |
OH MY GOD. I HAVE VERSION 15.5 |
really? |
When I do node -v. It says v15.5.0 |
oh, its node's version Do it: |
Now it says ncaught TypeError: (intermediate value).setColor(...).setTitle(...).addFields is not a function when I do !command which is an embed |
Version 12.5.1 I checked now. Look at the message above though. |
i really do no what is it i'm testing in my pc, I already answer here |
So what now? |
wait pls |
How though? |
I used |
Not for me sadly |
Not for me though. Its sad because I put a lot of effort and it does not work. |
I used v12.5.1 with this code:
|
It worked yesterday very well. |
did you use a VPS or any server? |
what do you mean? |
The BOT is running in your PC (cmd, Visual Studio Code Terminal) or its in a server (Virtual Private Server [VPS]) |
Visual Studio Code terminal |
I really dont know what is this bug... I'm sorry :/ |
Ok. I guess |
Really sad about this. |
@NemSeih? Now its just saying Uncaught TypeError: (intermediate value).setColor(...).setTitle(...).addFields is not a function for !command, !jointeam, etc? |
@anish-kum The code you're posting here isn't from this repository, you can't get help unless you use the code here without modifying it too much |
Ok. sorry |
When I try the play command, always after I say the name of the song it says in chat that something went wrong with the search of said song and then when I look in the console it says
"TypeError: Cannot read property 'client' of undefined
at new MessageEmbed
\node_modules\discord.js\src\structures\MessageEmbed.js:10:60)
at PlayCommand.run
\commands\music\play.js:144:21)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async CommandMessage.run
\node_modules\discord.js-commando\src\commands\message.js:212:19)
at async CommandDispatcher.handleMessage
\node_modules\discord.js-commando\src\dispatcher.js:127:19)
events.js:194"
Btw I took out where it says my name as a user like C:\Users\NAME\Docs\NAME.OF.FOLDER\ANOTHER.NAME
The text was updated successfully, but these errors were encountered: