> ## 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.

# TriggerObject

> Interface exported by @botmesh/core.

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

A text trigger with an explicit match strategy and scope.

## Example

```ts theme={null}
bot.when({ pattern: 'price', match: 'contains', scope: 'dm' }, (ctx) => ctx.reply('Our prices: …'))
```

## Properties

### pattern

```ts theme={null}
pattern: string | RegExp | (string | RegExp)[];
```

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

***

### match?

```ts theme={null}
match?: MatchStrategy;
```

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

***

### scope?

```ts theme={null}
scope?: TriggerScope;
```

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


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