> ## Documentation Index
> Fetch the complete documentation index at: https://stars-components.js.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Function: RegisterCommand()

> **RegisterCommand**\<`Options`>(`data`): (`target`) => `void`

Defined in: [packages/http-framework/src/lib/interactions/decorators/RegisterCommand.ts:26](https://github.com/wolfstar-project/stars-components/blob/5aefd164bc5fc41e5a35d3abf908c288163dd354/packages/http-framework/src/lib/interactions/decorators/RegisterCommand.ts#L26)

Registers a command for the chat input.

## Type Parameters

### Options

`Options` *extends* [`PieceOptions`](/documentation/api/http-framework/interfaces/PieceOptions) = [`PieceOptions`](/documentation/api/http-framework/interfaces/PieceOptions)

The options type for the command.

## Parameters

### data

`CommandData`

The command data.

## Returns

(`target`) => `void`

## Example

```typescript theme={"system"}
import { Command, RegisterCommand } from '@wolfstar/http-framework';

(at)RegisterCommand({
	name: 'ping',
	description: 'A simple ping pong command'
})
export class UserCommand extends Command {
	public async run(interaction: Command.ChatInputInteraction) {
		return interaction.reply('Pong!');
	}
}
```
