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 toolkit3d 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
monbrey3d ago
yes, event listeners can be async
LukeZ
LukeZ3d ago
Well, it's not a typical event listener, it's this:
No description
Deimoss
Deimoss3d ago
just make the callback async, simple as that
LukeZ
LukeZ3d ago
Roger Roger 👍🏻
Want results from more Discord servers?
Add your server