How can I get the message id after channel.send?

How can I get the message id after channel.send? Please provide a link to the documentation where I can find the returned object. Or a code example. I can not find 😦
5 Replies
d.js toolkit
d.js toolkit10mo 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
darp
darp10mo ago
channel.send returns Promise<Message> the message has id
iFel1x
iFel1xOP10mo ago
u mean like:
const mesid = channel.send(...);
const mesid = channel.send(...);
and mesid will have id?
d.js docs
d.js docs10mo ago
Resources to understand Promise: - MDN: learn more - Guide: learn more - JavaScript info: learn more
iFel1x
iFel1xOP10mo ago
@darp Got it, thanks!
Want results from more Discord servers?
Add your server