> ## Documentation Index
> Fetch the complete documentation index at: https://baileys.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat

> Protobuf class Chat generated from WAProto.

Defined in: [WAProto/index.d.ts:5873](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5873)

## Implements

* [`IChat`](/proto-reference/Message/interfaces/IChat)

## Constructors

### new Chat()

> **new Chat**(`p`?): [`Chat`](/proto-reference/Message/classes/Chat)

Defined in: [WAProto/index.d.ts:5874](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5874)

#### Parameters

##### p?

[`IChat`](/proto-reference/Message/interfaces/IChat)

#### Returns

[`Chat`](/proto-reference/Message/classes/Chat)

## Properties

### displayName?

> `optional` **displayName**: `null` | `string`

Defined in: [WAProto/index.d.ts:5875](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5875)

#### Implementation of

[`IChat`](/proto-reference/Message/interfaces/IChat).[`displayName`](/proto-reference/Message/interfaces/IChat#displayname)

***

### id?

> `optional` **id**: `null` | `string`

Defined in: [WAProto/index.d.ts:5876](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5876)

#### Implementation of

[`IChat`](/proto-reference/Message/interfaces/IChat).[`id`](/proto-reference/Message/interfaces/IChat#id)

## Methods

### create()

> `static` **create**(`properties`?): [`Chat`](/proto-reference/Message/classes/Chat)

Defined in: [WAProto/index.d.ts:5877](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5877)

#### Parameters

##### properties?

[`IChat`](/proto-reference/Message/interfaces/IChat)

#### Returns

[`Chat`](/proto-reference/Message/classes/Chat)

***

### decode()

> `static` **decode**(`r`, `l`?): [`Chat`](/proto-reference/Message/classes/Chat)

Defined in: [WAProto/index.d.ts:5879](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5879)

#### Parameters

##### r

`Uint8Array`\<`ArrayBufferLike`> | `Reader`

##### l?

`number`

#### Returns

[`Chat`](/proto-reference/Message/classes/Chat)

***

### encode()

> `static` **encode**(`m`, `w`?): `Writer`

Defined in: [WAProto/index.d.ts:5878](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5878)

#### Parameters

##### m

[`IChat`](/proto-reference/Message/interfaces/IChat)

##### w?

`Writer`

#### Returns

`Writer`

***

### fromObject()

> `static` **fromObject**(`d`): [`Chat`](/proto-reference/Message/classes/Chat)

Defined in: [WAProto/index.d.ts:5880](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5880)

#### Parameters

##### d

#### Returns

[`Chat`](/proto-reference/Message/classes/Chat)

***

### getTypeUrl()

> `static` **getTypeUrl**(`typeUrlPrefix`?): `string`

Defined in: [WAProto/index.d.ts:5883](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5883)

#### Parameters

##### typeUrlPrefix?

`string`

#### Returns

`string`

***

### toJSON()

> **toJSON**(): `object`

Defined in: [WAProto/index.d.ts:5882](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5882)

#### Returns

`object`

***

### toObject()

> `static` **toObject**(`m`, `o`?): `object`

Defined in: [WAProto/index.d.ts:5881](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L5881)

#### Parameters

##### m

[`Chat`](/proto-reference/Message/classes/Chat)

##### o?

`IConversionOptions`

#### Returns

`object`
