# GuildOnly

`function` in `core` · v0.7.0

<https://docs.seedcord.org/packages/core/0.7.0/guild-only>

Passes inside a guild, else refuses.

Agnostic. Attaches to any handler kind. Often paired with `RequirePermissions` in an [`and`](/packages/core/0.7.0/functions/and).

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

Passes inside a guild, else refuses.

Agnostic. Attaches to any handler kind. Often paired with `RequirePermissions` in an [`and`](/packages/core/0.7.0/functions/and).

Parameters.

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

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