> ## Documentation Index
> Fetch the complete documentation index at: https://baileys.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# Ações em mensagens

> Edite, delete, marque como lido e atualize digitação ou presença.

## Deletar mensagem para todos

```typescript theme={null}
const msg = await sock.sendMessage(jid, { text: 'hello world' })
await sock.sendMessage(jid, { delete: msg.key })
```

<Note>
  Para deletar só para você, use `sock.chatModify` com `clear`. Veja [gerenciar conversas](/pt-BR/messaging/chat-management).
</Note>

## Editar mensagem

```typescript theme={null}
const sent = await sock.sendMessage(jid, { text: 'hello world' })

await sock.sendMessage(jid, {
      text: 'updated text goes here',
      edit: sent.key,
    });
```

## Marcar como lida

O Baileys exige marcar keys individuais — não dá para marcar uma conversa inteira.

```typescript theme={null}
const key: WAMessageKey
await sock.readMessages([key])
```

## Atualizar presença

```typescript theme={null}
await sock.sendPresenceUpdate('available', jid)
```

| Valor         | Significado      |
| ------------- | ---------------- |
| `available`   | Online           |
| `unavailable` | Offline          |
| `composing`   | Digitando        |
| `recording`   | Gravando áudio   |
| `paused`      | Parou de digitar |

<Warning>
  Atualizações de presença expiram em \~10 segundos. Para sustentar "digitando…", envie repetidamente.
</Warning>

<Note>
  Marque o Baileys como offline com `sock.sendPresenceUpdate('unavailable')` se quiser pushes no celular enquanto o bot roda.
</Note>

Para chamadas, veja [Lidar com chamadas do WhatsApp](/pt-BR/advanced/calls).
