Skip to content

Defined in: zaun/js/index.d.ts:646

new Channel(): Channel

Channel

readonly client: Client

Defined in: zaun/js/index.d.ts:647


readonly community: Community

Defined in: zaun/js/index.d.ts:648


readonly data: any

Defined in: zaun/js/index.d.ts:658


readonly id: string

Defined in: zaun/js/index.d.ts:649


readonly isDM: boolean

Defined in: zaun/js/index.d.ts:686

DM: a direct message, not a community channel.


readonly members: Collection<string, Member>

Defined in: zaun/js/index.d.ts:656

Who is in this voice channel now.


readonly messages: object

Defined in: zaun/js/index.d.ts:657

fetch(options?): Promise<Collection<string, Message>>

number

number

Promise<Collection<string, Message>>


readonly name: string

Defined in: zaun/js/index.d.ts:650


readonly parent: Channel

Defined in: zaun/js/index.d.ts:654


readonly position: number

Defined in: zaun/js/index.d.ts:653


readonly recipient: Member

Defined in: zaun/js/index.d.ts:688

DM: the other participant of a direct message, or null.


readonly topic: string

Defined in: zaun/js/index.d.ts:652


readonly type: "text" | "announcement" | "voice" | "category" | "forum" | "stage"

Defined in: zaun/js/index.d.ts:651


readonly typing: { kind: "named"; member_ids: string[]; } | { count: 1 | 2 | 3; kind: "anonymous"; }

Defined in: zaun/js/index.d.ts:662

Who else is typing now, or null; anonymous channels give only a count (3 = three or more).


readonly typingMode: "named" | "anonymous" | "off"

Defined in: zaun/js/index.d.ts:660

Who sees typing here.

autocomplete(command, options): Promise<string>

Defined in: zaun/js/index.d.ts:678

Asks for suggestions for the option marked focused; they come as autocomplete.

string | ApplicationCommandData

OptionValueData[]

Promise<string>


click(message, customId, values?): Promise<string>

Defined in: zaun/js/index.d.ts:676

Clicks a button, or chooses values in a select, of bot message message (its id).

string

string

string[]

Promise<string>


closeDm(): Promise<void>

Defined in: zaun/js/index.d.ts:690

DM: closes a direct message for this member.

Promise<void>


delete(): Promise<void>

Defined in: zaun/js/index.d.ts:684

Promise<void>


invokeCommand(command, options?, target?): Promise<string>

Defined in: zaun/js/index.d.ts:674

Runs a bot command here: a command object, its id, or a slash command’s name ("help", looked up in community.commands; rejects when no bot or several have it). Resolves with the interaction id (answers come as events).

string | ApplicationCommandData

OptionValueData[]

string

Promise<string>


isCategory(): boolean

Defined in: zaun/js/index.d.ts:669

boolean


isText(): boolean

Defined in: zaun/js/index.d.ts:667

boolean


isVoice(): boolean

Defined in: zaun/js/index.d.ts:668

boolean


join(options?): Promise<VoiceConnection>

Defined in: zaun/js/index.d.ts:683

Joins this voice channel (browsers with WebRTC only). Relayed through the host’s TURN server unless allowDirect, and sealed end to end.

boolean

boolean

boolean

MediaStreamTrack

Promise<VoiceConnection>


send(options): Promise<Message>

Defined in: zaun/js/index.d.ts:670

MessageOptions

Promise<Message>


setTypingMode(mode): Promise<void>

Defined in: zaun/js/index.d.ts:666

typing: sets who sees typing here (MANAGE_CHANNELS).

"named" | "anonymous" | "off"

Promise<void>


startTyping(): boolean

Defined in: zaun/js/index.d.ts:664

Says this member is typing; false (nothing sent) where typing is off.

boolean


submitModal(modal, customId, components): Promise<string>

Defined in: zaun/js/index.d.ts:680

Submits a modal from modalOpen (its interaction is modal).

string

string

object[]

Promise<string>