Using Slash Command to send a message in a different chat and I want to capture the response
Hey I have this code that once a process is finished I'll notify the result in a different channel and I want to collect the first response of this other channel to continue to another step. How to await for the response and store the data?
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 OP[email protected]
v20.12.2
Create a variable from the returned (and
await
ed) value of channel.send()
:method: TextChannel#send
@14.15.3
Sends a message to this channel.
:method: TextChannel#awaitMessages @14.15.3
Similar to createMessageCollector but in promise form. Resolves with a collection of messages that pass the specified filter.
gonna test it guys, thank you
it worked @Qjuh, thanks a lot