Member
Defined in: sdk/js/src/member.ts:38
A community member.
Implements
Section titled “Implements”Member
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Member(
raw):Member
Defined in: sdk/js/src/member.ts:50
Parameters
Section titled “Parameters”Member
Returns
Section titled “Returns”Member
Properties
Section titled “Properties”
readonlybotId:string
Defined in: sdk/js/src/member.ts:44
Set only for bots.
Implementation of
Section titled “Implementation of”wit.Member.botId
displayName
Section titled “displayName”
readonlydisplayName:string
Defined in: sdk/js/src/member.ts:40
Implementation of
Section titled “Implementation of”wit.Member.displayName
joinedAt
Section titled “joinedAt”
readonlyjoinedAt:bigint
Defined in: sdk/js/src/member.ts:42
Implementation of
Section titled “Implementation of”wit.Member.joinedAt
memberId
Section titled “memberId”
readonlymemberId:string
Defined in: sdk/js/src/member.ts:39
Implementation of
Section titled “Implementation of”wit.Member.memberId
roleIds
Section titled “roleIds”
readonlyroleIds:string[]
Defined in: sdk/js/src/member.ts:41
Implementation of
Section titled “Implementation of”wit.Member.roleIds
readonlyroles:MemberRoles
Defined in: sdk/js/src/member.ts:48
Role ids and add / remove / has.
voiceChannel
Section titled “voiceChannel”
readonlyvoiceChannel: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).
Implementation of
Section titled “Implementation of”wit.Member.voiceChannel
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get bot():
boolean
Defined in: sdk/js/src/member.ts:85
Whether the member is a bot.
Returns
Section titled “Returns”boolean
Get Signature
Section titled “Get Signature”get id():
string
Defined in: sdk/js/src/member.ts:61
The member id.
Returns
Section titled “Returns”string
joinedTimestamp
Section titled “joinedTimestamp”Get Signature
Section titled “Get Signature”get joinedTimestamp():
number
Defined in: sdk/js/src/member.ts:90
When the member joined, ms since the epoch.
Returns
Section titled “Returns”number
voiceChannelId
Section titled “voiceChannelId”Get Signature
Section titled “Get Signature”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.
Returns
Section titled “Returns”string
Methods
Section titled “Methods”kick()
Section titled “kick()”kick(
reason?):void
Defined in: sdk/js/src/member.ts:104
Removes the member from the community (KICK_MEMBERS).
Parameters
Section titled “Parameters”reason?
Section titled “reason?”string
Returns
Section titled “Returns”void
mention()
Section titled “mention()”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).
Returns
Section titled “Returns”string
send()
Section titled “send()”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.
Parameters
Section titled “Parameters”payload
Section titled “payload”Returns
Section titled “Returns”object
channelId
Section titled “channelId”channelId:
string
messageId
Section titled “messageId”messageId:
string
timeout()
Section titled “timeout()”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).
Parameters
Section titled “Parameters”number
reason?
Section titled “reason?”string
Returns
Section titled “Returns”void
toString()
Section titled “toString()”toString():
string
Defined in: sdk/js/src/member.ts:80
<@id>.
Returns
Section titled “Returns”string