# OwnerOnly

`function` in `seedcord` · v0.15.0

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

Passes only for a user id listed in `config.ownerIds`, else refuses.

Agnostic, so it attaches to interaction and event handlers alike. With no `ownerIds` configured it refuses every caller. Pass [`GateNoticeOptions`](/packages/seedcord/0.15.0/interfaces/gate-notice-options) to reword or replace the refusal.

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

Passes only for a user id listed in `config.ownerIds`, else refuses.

Agnostic, so it attaches to interaction and event handlers alike. With no `ownerIds` configured it refuses every caller. Pass [`GateNoticeOptions`](/packages/seedcord/0.15.0/interfaces/gate-notice-options) to reword or replace the refusal.

Parameters.

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

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