# ReplySender

`class` in `seedcord` · v0.15.0

<https://docs.seedcord.org/packages/seedcord/0.15.0/classes/reply-sender>

Sends a [`ReplyResponse`](/packages/types/0.7.1/interfaces/reply-response) to an interaction, picking reply, editReply, or followUp from the live acknowledgement state. Logs and drops its own send failures so a dead token never escapes into the controller.

```ts
class ReplySender
```

## Constructors

### constructor

```ts
ReplySender(interaction: Repliables)
```

Constructs a new instance of the `ReplySender` class

## Methods

### edit

```ts
public async edit(
    message: Message,
    response: ReplyResponse
): Promise<void>
```

Edits an already-sent message to a new [`ReplyResponse`](/packages/types/0.7.1/interfaces/reply-response). Used to swap a confirmation prompt for its outcome. Never throws, a failed edit is logged and dropped.

### send

```ts
public async send(
    response: ReplyResponse,
    ephemeral?: boolean
): Promise<Message | undefined>
```

Sends the reply and returns the sent message so a caller can attach a collector to it. Never throws, a failed send is logged and dropped and resolves to `undefined`.
