# Silence

`class` in `core` · v0.6.0

<https://docs.seedcord.org/packages/core/0.6.0/classes/silence>

Throw to stop a handler with no reply and no report.

The framework boundary catches `Silence` before [`Notice`](/packages/core/0.6.0/classes/notice), makes zero Discord calls, and stops. Ideally you'd only throw this in `EventHandlers` (or `Gates` for those), because it doesn't make sense to leave the user with no reply for an interaction.

```ts
class Silence extends Error
```

## Examples

```ts
import { Silence } from '@seedcord/gateway';

// a helper under a guildMemberAdd handler, stopping when this guild configured nothing to send
const template = await settings.welcome(member.guild.id);
if (!template) throw new Silence('no welcome message set');
```

## Constructors

### constructor

```ts
Silence(reason?: string | undefined)
```

Constructs a new instance of the `Silence` class

## Properties

### reason

```ts
public readonly reason: string | undefined
```
