# Client

```javascript
new Client(clientOptions)
```

| Argument      | Type                                                              | Description                |
| ------------- | ----------------------------------------------------------------- | -------------------------- |
| clientOptions | [clientOptions](https://diswrap.js.org/definitions/clientoptions) | The options for the client |

## Properties

### client

{% tabs %}
{% tab title="Description" %}
Returns the client object of the bot, as returned by Discord.js
{% endtab %}

{% tab title="Returns" %}
[Client](https://discord.js.org/#/docs/discord.js/stable/class/Client)
{% endtab %}
{% endtabs %}

### commands

{% tabs %}
{% tab title="Description" %}
Returns an object with information on loaded template commands
{% endtab %}

{% tab title="Returns" %}
Object
{% endtab %}
{% endtabs %}

### customCommands

{% tabs %}
{% tab title="Description" %}
Returns an object with information on loaded custom commands
{% endtab %}

{% tab title="Returns" %}
Object
{% endtab %}
{% endtabs %}

### intents

{% tabs %}
{% tab title="Description" %}
Returns the intents that the bot is using
{% endtab %}

{% tab title="Returns" %}
Array
{% endtab %}
{% endtabs %}

### token

{% tabs %}
{% tab title="Description" %}
Returns the token used to log the bot in
{% endtab %}

{% tab title="Returns" %}
String
{% endtab %}
{% endtabs %}

## Methods

### commandsCreate

```javascript
commandsCreate(commandBuilder, custom)
```

{% hint style="info" %}
The type [Commands](https://diswrap.js.org/types/commands) contain an Object of all the available template commands' [commandsBuilder](https://diswrap.js.org/classes/commandsbuilder) class.
{% endhint %}

<table><thead><tr><th width="160">Argument</th><th width="119" data-type="checkbox">Required</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td>commandBuilder</td><td>true</td><td><a href="commandsbuilder">commandsBuilder</a></td><td>The object containing all the information about the command, derived from commandsBuilder class</td></tr><tr><td>custom</td><td>true</td><td>Function</td><td>The function is to run once the command is executed. This will override all the built-in actions to the template.</td></tr></tbody></table>

Returns: Object

### onEventRun

```javascript
onEventRun(event, callback)
```

<table><thead><tr><th width="160">Argument</th><th width="119" data-type="checkbox">Required</th><th width="109">Type</th><th>Description</th></tr></thead><tbody><tr><td>event</td><td>true</td><td>String</td><td>The name of the command</td></tr><tr><td>callback</td><td>true</td><td>Function</td><td>The description of the command, used for slash command registration</td></tr></tbody></table>

### publishCommand

```javascript
publishCommand(operation)
```

<table><thead><tr><th width="125">Argument</th><th width="103" data-type="checkbox">Required</th><th width="96">Type</th><th>Description</th></tr></thead><tbody><tr><td>operation</td><td>true</td><td>Number</td><td>The operation to perform on the command. | Use the <a href="../types/slashcommandoperations">SlashCommandOperations</a> module.</td></tr></tbody></table>
