📌  相关文章
📜  如何让不和谐的 js 机器人获得自己的消息 ID - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:50.538000             🧑  作者: Mango

代码示例1
// 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 .id, as usually
  console.log(id);
}

// with .then():
message.reply("Your stuff").then(sent => { // 'sent' is that message you just sent
  let id = sent.id;
  console.log(id);
});