# CommandRegistry

`class` in `seedcord` · v0.15.0

<https://docs.seedcord.org/packages/seedcord/0.15.0/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`, not constructed 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
```
