Skip to content
Functioncorev0.10.0

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 to reword or replace the refusal.

See also:the @Gated decorator from your transport package

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

options?

Reword the default refusal with message, or replace it with notice.