> For the complete documentation index, see [llms.txt](https://imthehumanoid.gitbook.io/antispammer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://imthehumanoid.gitbook.io/antispammer/docs/complex.md).

# Complex

### Constructor

```javascript
new antispam.complex(filters);
```

| Parameter | Type  | Description                   |
| --------- | ----- | ----------------------------- |
| filters   | array | An array of antispam filters. |

### Methods

#### .addFilter(filter)

Adds a filter to the complex multifilter.

| Parameter | Type   | Description         |
| --------- | ------ | ------------------- |
| filter    | object | An antispam filter. |

returns array

#### .removeFilter(filterIndex)

Removes a filter by idex.

| Parameter   | Type   | Description                       |
| ----------- | ------ | --------------------------------- |
| filterIndex | number | An index in the array of filters. |

returns array

#### .check(id)

Adds a use to a user by ID to each filter and acts upon it depending on if it is considered spam or not.

| Parameter | Type   | Description                     |
| --------- | ------ | ------------------------------- |
| id        | string | A string that identifes a user. |

returns function

#### .clear(id)

Clears all uses from a user in each filter by ID.

| Parameter | Type   | Description                     |
| --------- | ------ | ------------------------------- |
| id        | string | A string that identifes a user. |

returns void

#### .has(id)

Checks if a user is spamming by ID.

| Parameter | Type   | Description                     |
| --------- | ------ | ------------------------------- |
| id        | string | A string that identifes a user. |

returns boolean
