how to make a discord js bot get its own message id
// with async/await:
async function replyAndLog() {
let sent = await message.reply("Your stuff..."); // this returns the message you just sent
let id = sent.id; // you can get its ID with <Message>.id, as usually
console.log(id);
}
// with <Promise>.then():
message.reply("Your stuff").then(sent => { // 'sent' is that message you just sent
let id = sent.id;
console.log(id);
});