# GateContextBase

`interface` in `seedcord` · v0.13.0

<https://docs.seedcord.org/packages/seedcord/0.13.0/interfaces/gate-context-base>

Fields present on both arms, so a gate reading only these needs no `kind` narrowing. Every field except `core` is nullable here, since an event may carry no user or guild.

```ts
interface GateContextBase
```

## Examples

```ts
// an agnostic gate reads only the base fields, so it fits any handler
const NeedsUser = defineGate('NeedsUser', (ctx: GateContextBase) => {
    if (!ctx.user) throw new NoUserNotice();
});
```

## Properties

### channelId

```ts
readonly channelId: string | null
```

The channel id, or null when the source carries none.

### core

```ts
readonly core: Core
```

The running framework, for reaching the bot, config, the rate limiter, and the bus.

### guild

```ts
readonly guild: Guild | null
```

The guild the action happened in, or null in a DM or a guildless event.

### guildId

```ts
readonly guildId: string | null
```

The guild id, or null outside a guild.

### member

```ts
readonly member: GuildMember | null
```

The acting member, or null outside a guild or when uncached.

### user

```ts
readonly user: User | null
```

The acting user, or null on an event that carries none.
