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

# WaitOptions

> Interface exported by @botmesh/core.

Defined in: [core/types.ts:496](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L496)

Options shared by the conversation controls that wait for an inbound message.

## Extended by

* [`AskStepOptions`](https://botmesh.afaya.com.co/api/core/interfaces/AskStepOptions)
* [`ChooseStepOptions`](https://botmesh.afaya.com.co/api/core/interfaces/ChooseStepOptions)

## Properties

### timeout?

```ts theme={null}
timeout?: string | number;
```

Defined in: [core/types.ts:497](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L497)

***

### validate?

```ts theme={null}
validate?: (body, ctx) => string | true | Promise<string | true>;
```

Defined in: [core/types.ts:498](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L498)

#### Parameters

| Parameter | Type |
| - | - |
| `body` | `string` |
| `ctx` | [`RuntimeMessage`](https://botmesh.afaya.com.co/api/core/interfaces/RuntimeMessage) |

#### Returns

`string` | `true` | `Promise`\<`string` | `true`>

***

### maxAttempts?

```ts theme={null}
maxAttempts?: number;
```

Defined in: [core/types.ts:504](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L504)

Total answers the wait accepts, the first one included, before the conversation ends
with the "too many attempts" message (`RetriesExceeded`). Invalid answers and
`c.retry()` calls count. Default `3`; `Infinity` = unlimited.

***

### retries?

```ts theme={null}
retries?: number;
```

Defined in: [core/types.ts:512](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L512)

Retries AFTER the first answer: `retries: N` is `maxAttempts: N + 1`. Pass one of the two.

Breaking in 2.0: during the alphas `retries: N` meant N total attempts; use
`maxAttempts: N` to keep that behaviour. A wait that sets `retries` without
`maxAttempts` logs one warning per bot (`logger.warn`) to flag the change.

***

### otherwise?

```ts theme={null}
otherwise?: string;
```

Defined in: [core/types.ts:513](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L513)

***

### filter?

```ts theme={null}
filter?: (ctx) => boolean;
```

Defined in: [core/types.ts:514](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L514)

#### Parameters

| Parameter | Type |
| - | - |
| `ctx` | [`RuntimeMessage`](https://botmesh.afaya.com.co/api/core/interfaces/RuntimeMessage) |

#### Returns

`boolean`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.