Client Actions Dispatch
What is the part of the Client that dispatches gateway events?
7 Replies
• 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.The websocket does that
Or ig, more specifically the shard
Is there a way to asynchronously wait for an event to be fired in a command?
You can wrap events in a Promise constructor, like how collectors do
How to use promises
Promises are the foundation of asynchronous programming in modern JavaScript. A promise is an object returned by an asynchronous function, which represents the current state of the operation. At the time the promise is returned to the caller, the operation often isn't finished, but the promise object provides methods to handle the eventual success or failure of the operation.
so new Promise(client.actions…)?
How would I define the event
?