#Problem with defering interaction

17 messages · Page 1 of 1 (latest)

void walrus
#

• 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.

foggy blade
#

try putting the deferReply outsite the try-catch statement

unique sonnet
#

you using this with docker by any chance?

#

alright. cause i have a similar problem. the interaction works sometimes, the other times it doesnt when running with docker.

foggy blade
#

issue related to your VPS connection's quality ig?

sturdy sundial
clever shoal
#

Because your VPS takes more than 3s to reach (and send) the deferReply (half of the time)

clever shoal
#

Find out why and either improve your code, improve your VPS or catch the error and live with it sometimes failing

#

Do you do anything before calling that run in your interactionCreate event? Could calling deferReply in there make it run earlier?

lofty heartBOT
#

Checking for things to not be equal in JavaScript:

- if (!yourVariable === yourOtherVariable) // !yourVariable is coerced to a boolean value
+ if (yourVariable !== yourOtherVariable) // checks that one is not equal to the other

• Comparison operators in JavaScript: learn more

clever shoal
#

Does the Unknown Interaction get thrown immediately or about 3 seconds after you use the command?

clever shoal
#

Then your code on your VPS is simply slow… probably because your VPS is slow

#

Probably some big process from another VPS slowing yours down now

sturdy sundial
#

Right so I should contact my host ?

clever shoal
#

Sounds like a plan

sturdy sundial
#

Okay