How do i display the ping of the bot and API ping

Im useing the latest Discord.js But i cant find a working option any suggest im also useing / commands
22 Replies
d.js toolkit
d.js toolkit•3y ago
• 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.
d.js docs
d.js docs•3y ago
guide Popular Topics: Miscellaneous - How do I check the bot's ping? The second, Roundtrip Latency, describes the amount of time a full API roundtrip (from the creation of the command message to the creation of the response message) takes. You then edit the response to the respective value to avoid needing to send yet another message: read more
Fractyl
FractylOP•3y ago
i keep gettinh this error TypeError: Cannot read properties of undefined (reading 'ws')
Hyproxen
Hyproxen•3y ago
Then you didn't define ws.
Hyproxen
Hyproxen•3y ago
Fractyl
FractylOP•3y ago
how do i do this 1 sec
Fractyl
FractylOP•3y ago
Fractyl
FractylOP•3y ago
ive tried both of them
Hyproxen
Hyproxen•3y ago
What's your exact discord.js version do npm list discord.js
Fractyl
FractylOP•3y ago
will do 1 second discord.js@14.11.0
Hyproxen
Hyproxen•3y ago
try using interaction.client.ws.ping instead of client.xxx
Fractyl
FractylOP•3y ago
ill give it a shot
Hyproxen
Hyproxen•3y ago
no need to pass client as a seperate variable
Fractyl
FractylOP•3y ago
that has worked
Hyproxen
Hyproxen•3y ago
since its included in interaction
Fractyl
FractylOP•3y ago
but how do i get the actual bot ping to? so i have websocket ping but how about actual bot ping
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Fractyl
FractylOP•3y ago
the latency
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Fractyl
FractylOP•3y ago
i believe so
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Fractyl
FractylOP•3y ago
Okay Thanks!

Did you find this page helpful?