Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question