βΉοΈTips
Introducing, lastMessage.
editLast & deleteLast
client.on('messageCreate', async (message) => {
const member = await message.member;
if (member.app) return;
await message.createMessage({content: "this is a message"}); // this is msg1
await message.editLast({content: "msg1 is edited."});
await message.createFollowup({content: "this is a message"}); // this is msg2
await message.editLast({content: "msg2 is edited."});
// The last message you sent is edited, allowing you to use the
// the same message component instead of using a stored one.
// this deletes msg2, which is in fact, the last message.
await message.deleteLast();
})Original Messages
Last updated