# Member

Defined in: [sdk/js/src/member.ts:38](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L38)

A community member.

## Implements

- `Member`

## Constructors

### Constructor

> **new Member**(`raw`): `Member`

Defined in: [sdk/js/src/member.ts:50](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L50)

#### Parameters

##### raw

`Member`

#### Returns

`Member`

## Properties

### botId

> `readonly` **botId**: `string`

Defined in: [sdk/js/src/member.ts:44](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L44)

Set only for bots.

#### Implementation of

`wit.Member.botId`

***

### displayName

> `readonly` **displayName**: `string`

Defined in: [sdk/js/src/member.ts:40](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L40)

#### Implementation of

`wit.Member.displayName`

***

### joinedAt

> `readonly` **joinedAt**: `bigint`

Defined in: [sdk/js/src/member.ts:42](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L42)

#### Implementation of

`wit.Member.joinedAt`

***

### memberId

> `readonly` **memberId**: `string`

Defined in: [sdk/js/src/member.ts:39](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L39)

#### Implementation of

`wit.Member.memberId`

***

### roleIds

> `readonly` **roleIds**: `string`[]

Defined in: [sdk/js/src/member.ts:41](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L41)

#### Implementation of

`wit.Member.roleIds`

***

### roles

> `readonly` **roles**: [`MemberRoles`](/docs/reference/js/zaun-bot/classes/memberroles/)

Defined in: [sdk/js/src/member.ts:48](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L48)

Role ids and `add` / `remove` / `has`.

***

### voiceChannel

> `readonly` **voiceChannel**: `string`

Defined in: [sdk/js/src/member.ts:46](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L46)

The voice channel the member is in, if any (and if the bot can see it).

#### Implementation of

`wit.Member.voiceChannel`

## Accessors

### bot

#### Get Signature

> **get** **bot**(): `boolean`

Defined in: [sdk/js/src/member.ts:85](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L85)

Whether the member is a bot.

##### Returns

`boolean`

***

### id

#### Get Signature

> **get** **id**(): `string`

Defined in: [sdk/js/src/member.ts:61](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L61)

The member id.

##### Returns

`string`

***

### joinedTimestamp

#### Get Signature

> **get** **joinedTimestamp**(): `number`

Defined in: [sdk/js/src/member.ts:90](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L90)

When the member joined, ms since the epoch.

##### Returns

`number`

***

### voiceChannelId

#### Get Signature

> **get** **voiceChannelId**(): `string`

Defined in: [sdk/js/src/member.ts:69](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L69)

The voice channel the member is in, if any and if the
bot can see it. Always filled for an interaction's invoker, so `/play` can join them.

##### Returns

`string`

## Methods

### kick()

> **kick**(`reason?`): `void`

Defined in: [sdk/js/src/member.ts:104](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L104)

Removes the member from the community (`KICK_MEMBERS`).

#### Parameters

##### reason?

`string`

#### Returns

`void`

***

### mention()

> **mention**(): `string`

Defined in: [sdk/js/src/member.ts:75](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L75)

The text that shows a mention of the member, `<@id>` (it notifies only if the message's
`mentions` names the member too).

#### Returns

`string`

***

### send()

> **send**(`payload`): `object`

Defined in: [sdk/js/src/member.ts:98](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L98)

Sends the member a direct message (capability `dms`), opening the DM when needed. Throws
`ZaunError` `FORBIDDEN` with detail `dms_closed` when they do not take DMs from bots.

#### Parameters

##### payload

[`MessagePayload`](/docs/reference/js/zaun-bot/type-aliases/messagepayload/)

#### Returns

`object`

##### channelId

> **channelId**: `string`

##### messageId

> **messageId**: `string`

***

### timeout()

> **timeout**(`until`, `reason?`): `void`

Defined in: [sdk/js/src/member.ts:109](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L109)

Times the member out until `until` (ms since the epoch); `null` clears it (`TIMEOUT_MEMBERS`).

#### Parameters

##### until

`number`

##### reason?

`string`

#### Returns

`void`

***

### toString()

> **toString**(): `string`

Defined in: [sdk/js/src/member.ts:80](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/member.ts#L80)

`<@id>`.

#### Returns

`string`
