# Tips

## Introducing, lastMessage.

Last Message is a group of methods that you can use, they've been built to boost your productivity, and are helping you to do simple actions without storing the last message, in other words, without writing 10 lines of codes for such simple things.

### editLast & deleteLast

Allows you to edit/delete the last message sent with the message component itself:

```javascript
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

Learn more: [Check out how this concept works to optimize your time interacting with parent messages/responses.](/managing-messages/original-message-concept-and-how-it-works.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.touchguild.com/managing-messages/tips.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
