# OwnerOnly

`function` in `core` · v0.1.0-next.5

<https://docs.seedcord.org/packages/core/0.1.0-next.5/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/core/0.1.0-next.5/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/core/0.1.0-next.5/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'>`.
