# ReplySender

`class` in `http` · v0.1.0-next.0

<https://docs.seedcord.org/packages/http/0.1.0-next.0/classes/reply-sender>

Writes interaction responses over the Discord REST callback and webhook endpoints. Construction is internal to the repliable handler bases and the dispatcher.

```ts
class ReplySender extends BaseReplySender<SentMessage>
```

## Constructors

### constructor

```ts
ReplySender(
    ref: InteractionRef,
    rest: REST,
    routeId: string
)
```

Constructs a new instance of the `ReplySender` class

## Methods

### writeDefer

```ts
protected async writeDefer(
    opts?: DeferOpts
): Promise<void>
```

### writeDeferUpdate

```ts
protected async writeDeferUpdate(): Promise<void>
```

### writeDeleteOriginal

```ts
protected async writeDeleteOriginal(): Promise<void>
```

### writeDeleteTarget

```ts
protected async writeDeleteTarget(
    targetId: string
): Promise<void>
```

### writeEditOriginal

```ts
protected async writeEditOriginal(
    response: ReplyResponse | string
): Promise<SentMessage>
```

### writeEditTarget

```ts
protected async writeEditTarget(
    targetId: string,
    response: ReplyResponse | string
): Promise<SentMessage>
```

### writeFollowUp

```ts
protected async writeFollowUp(
    response: ReplyResponse | string,
    opts?: SendOpts
): Promise<SentMessage>
```

### writeModal

```ts
protected async writeModal(
    data: APIModalInteractionResponseCallbackData
): Promise<void>
```

### writeReply

```ts
protected async writeReply(
    response: ReplyResponse | string,
    opts?: SendOpts
): Promise<SentMessage | undefined>
```

### writeUpdate

```ts
protected async writeUpdate(
    response: ReplyResponse | string
): Promise<SentMessage | undefined>
```
