I am experiencing high ping


#1

My discord.js bot is having ping up to 2k


#2

How are you pinging your bot?


#3

Well my bot takes forever to respond, takes up to 7 seconds


#4

Ok, that’s not the same thing. As a first step I suggest adding logging to your app when a request is received and a response is sent so you can work out where time is being spent.


#5

It goes to glitch fast but it isnt process fast. How can i make it go faster?


#7

i also get sent “Your app is taking a while to stop…”


#8

And im getting the error " Error: Unhandled “error” event. ([object Object])" I have dmed you a link to my project @Gareth


#9

I have also noticed that this is very high

could this have an effect on it?


#10

If your bot uses a third party API, like Discord, then your bot will not be able to respond faster than the amount of time that service needs to get back to your app.

In this case, Discord’s response time appears to be the source of your bot’s delay.

Currently, the Discord’s API Response Time looks a bit better than you initially posted, but it’s definitely something that contributes, significantly, to the delay of your bot’s response.

If you have other 3rd party APIs on your bot, you will need to take their total response time(s) into your calculations, too.


#11

The only occurrence I could see of an unhandled error event in your project is UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): DiscordAPIError: Missing Permissions. Make sure your bot has sufficient permissions to undertake the desired action. See https://discordapp.com/developers/docs/topics/permissions for more info.