# DmOnly

`function` in `seedcord` · v0.15.0

<https://docs.seedcord.org/packages/seedcord/0.15.0/functions/dm-only>

Passes in a direct message, else refuses.

Agnostic, so it attaches to any handler kind. The inverse of [`GuildOnly`](/packages/seedcord/0.15.0/functions/guild-only), so combining the two in an [`and`](/packages/seedcord/0.15.0/functions/and) can never pass.

```ts
DmOnly(
    options?: GateNoticeOptions
): Gate<GateContextBase, "DmOnly">
```

Passes in a direct message, else refuses.

Agnostic, so it attaches to any handler kind. The inverse of [`GuildOnly`](/packages/seedcord/0.15.0/functions/guild-only), so combining the two in an [`and`](/packages/seedcord/0.15.0/functions/and) can never pass.

Parameters.

- `options?` `GateNoticeOptions` — Reword the default refusal with `message`, or replace it with `notice`.

Returns `Gate<GateContextBase, 'DmOnly'>`.
