M
M
Matvey Subbotin2020-08-08 08:35:43
Node.js
Matvey Subbotin, 2020-08-08 08:35:43

How can a bot send and find out the ID of the same message?

I need the bot to send and find out the ID of the sent message...
I tried to do it via await on the lastMessageID, but the first time it says "undefined", and the second time it says the ID of the penultimate message sent by the bot...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wondermarin, 2020-08-08
@KokiMoki

Well, I think it's worth starting with the documentation .

channel.send("Test").then(message => console.log(message.id));

const message = await channel.send("Test");
console.log(message.id);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question