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
d.js toolkit
d.js toolkit2mo ago
- 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 OP
monbrey
monbrey2mo ago
yes, event listeners can be async
LukeZ
LukeZOP2mo ago
Well, it's not a typical event listener, it's this:
No description
Deimoss
Deimoss2mo ago
just make the callback async, simple as that
LukeZ
LukeZOP2mo ago
Roger Roger 👍🏻
Want results from more Discord servers?
Add your server