Skip to content

Defined in: sdk/js/src/member.ts:38

A community member.

  • Member

new Member(raw): Member

Defined in: sdk/js/src/member.ts:50

Member

Member

readonly botId: string

Defined in: sdk/js/src/member.ts:44

Set only for bots.

wit.Member.botId


readonly displayName: string

Defined in: sdk/js/src/member.ts:40

wit.Member.displayName


readonly joinedAt: bigint

Defined in: sdk/js/src/member.ts:42

wit.Member.joinedAt


readonly memberId: string

Defined in: sdk/js/src/member.ts:39

wit.Member.memberId


readonly roleIds: string[]

Defined in: sdk/js/src/member.ts:41

wit.Member.roleIds


readonly roles: MemberRoles

Defined in: sdk/js/src/member.ts:48

Role ids and add / remove / has.


readonly voiceChannel: string

Defined in: sdk/js/src/member.ts:46

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

wit.Member.voiceChannel

get bot(): boolean

Defined in: sdk/js/src/member.ts:85

Whether the member is a bot.

boolean


get id(): string

Defined in: sdk/js/src/member.ts:61

The member id.

string


get joinedTimestamp(): number

Defined in: sdk/js/src/member.ts:90

When the member joined, ms since the epoch.

number


get voiceChannelId(): string

Defined in: sdk/js/src/member.ts:69

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.

string

kick(reason?): void

Defined in: sdk/js/src/member.ts:104

Removes the member from the community (KICK_MEMBERS).

string

void


mention(): string

Defined in: sdk/js/src/member.ts:75

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

string


send(payload): object

Defined in: sdk/js/src/member.ts:98

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.

MessagePayload

object

channelId: string

messageId: string


timeout(until, reason?): void

Defined in: sdk/js/src/member.ts:109

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

number

string

void


toString(): string

Defined in: sdk/js/src/member.ts:80

<@id>.

string