# RegisterCommand

`function` in `core` · v0.8.0

<https://docs.seedcord.org/packages/core/0.8.0/functions/register-command>

Registers a command in the guilds listed under `commands.guilds`. With no ids listed there, the command deploys globally.

## Signature 1

```ts
RegisterCommand(): (ctor: CommandCtor) => void
```

Registers a command in the guilds listed under `commands.guilds`. With no ids listed there, the command deploys globally.

Returns `(ctor: CommandCtor) => void`.

## Signature 2

```ts
RegisterCommand(
    scope: "global"
): (ctor: CommandCtor) => void
```

Registers a command globally, ignoring `commands.guilds`.

Parameters.

- `scope` `'global'`

Returns `(ctor: CommandCtor) => void`.

## Signature 3

```ts
RegisterCommand(
    scope: "guild",
    guilds: GuildTarget[]
): (ctor: CommandCtor) => void
```

Registers a command in the guilds you pass. These ids replace `commands.guilds`. Include `'config'` among them to keep that list too.

Parameters.

- `scope` `'guild'`
- `guilds` `GuildTarget[]`

Returns `(ctor: CommandCtor) => void`.
