> For the complete documentation index, see [llms.txt](https://tribui141108.gitbook.io/nocli-handler.js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tribui141108.gitbook.io/nocli-handler.js/utilities/handlecommandautocomplete.md).

# handleCommandAutocomplete

Handles autocomplete for a command | Function

```typescript
handleCommandAutocomplete(commands, guildId, defaultCommands)
```

| Parameter          | Description                             | Type                                                              |
| ------------------ | --------------------------------------- | ----------------------------------------------------------------- |
| `commands`         | The map of commands                     | `Map<string,`[`Command`](/nocli-handler.js/classes/command.md)`>` |
| `guildId?`         | The guild ID                            | `string \| null \| undefined`                                     |
| `defaultCommands?` | Whether to only include defaultCommands | `Boolean`                                                         |

### Returns

```typescript
string[]
```
