When listening to a rest request, can I use an async function?
I just read this: https://discordjs.guide/additional-info/changes-in-v14.html#apirequest
And now I want to implement my own logger and may have to use an await statement - is this possible?
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
5 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!
- ✅
Marked as resolved by OPyes, event listeners can be async
Well, it's not a typical event listener, it's this:
just make the callback async, simple as that
Roger Roger 👍🏻