# CommandRegistry

`class` in `gateway` · v0.1.0-next.3

<https://docs.seedcord.org/packages/gateway/0.1.0-next.3/classes/command-registry>

Manages Discord application command registration and deployment.

Scans command directories, builds command structures, and registers both global and guild-scoped commands to Discord's API. Accessed via `core.bot.commands`. Do not construct it directly.

```ts
class CommandRegistry implements Initializeable, HmrAware
```

## Constructors

### constructor

```ts
CommandRegistry(
    core: Core,
    onDeployed?:
        | ((result: DeployResult) => void)
        | undefined
)
```

Constructs a new instance of the `CommandRegistry` class

## Properties

### globalCommands

```ts
public readonly globalCommands: (SlashCommandBuilder | ContextMenuCommandBuilder)[]
```

### guildCommands

```ts
public readonly guildCommands: Collection<string, (SlashCommandBuilder | ContextMenuCommandBuilder)[]>
```

### name

```ts
public readonly name
```
