Error with Ping command
I made a ping command and wanted to go a little further. I wanted to display the bot's ping by executing /ping, but it's not working. Despite many modifications, I still can't find a solution to this problem.
The issue is with ${client.ws.ping}. The code is in the discussion. Thanks for helping me.
18 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![email protected]
nœud v16.14.2
Code:
Problème : ${client.ws.ping}
thats not valid javascript
not do you define client anywhere
thats also v13 code
#rules 1
and 3
Ok.
How can I fix this issue ?
by writing valid javascript
not your self made french javascript
No, no, no.
This is the error of my traductor.
This is the code.
why did you put your code in a translator
No, a pc traslator.
regardless
i have 0 clue whether you actually wrote valid js
yeah that looks better
still, you dont define client, and thats v13 code
while you import the v14 equivalent
What then are equivalent in v14 ?
This is in v13 ?
the one you use yes
the one you import, no
thats better
but you still do not define client
and no, you should not use the import
almost all djs structures have a client property
I will test it.
It's work !!!