# GuildOnly

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

<https://docs.seedcord.org/packages/core/0.1.0-next.5/functions/guild-only>

Passes inside a guild, else refuses.

Agnostic, so it attaches to any handler kind. Often paired with `RequirePermissions` in an [`and`](/packages/core/0.1.0-next.5/functions/and).

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

Passes inside a guild, else refuses.

Agnostic, so it attaches to any handler kind. Often paired with `RequirePermissions` in an [`and`](/packages/core/0.1.0-next.5/functions/and).

Parameters.

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

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