Channel
Defined in: zaun/js/index.d.ts:646
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Channel():
Channel
Returns
Section titled “Returns”Channel
Properties
Section titled “Properties”client
Section titled “client”
readonlyclient:Client
Defined in: zaun/js/index.d.ts:647
community
Section titled “community”
readonlycommunity:Community
Defined in: zaun/js/index.d.ts:648
readonlydata:any
Defined in: zaun/js/index.d.ts:658
readonlyid:string
Defined in: zaun/js/index.d.ts:649
readonlyisDM:boolean
Defined in: zaun/js/index.d.ts:686
DM: a direct message, not a community channel.
members
Section titled “members”
readonlymembers:Collection<string,Member>
Defined in: zaun/js/index.d.ts:656
Who is in this voice channel now.
messages
Section titled “messages”
readonlymessages:object
Defined in: zaun/js/index.d.ts:657
fetch()
Section titled “fetch()”fetch(
options?):Promise<Collection<string,Message>>
Parameters
Section titled “Parameters”options?
Section titled “options?”before?
Section titled “before?”number
limit?
Section titled “limit?”number
Returns
Section titled “Returns”Promise<Collection<string, Message>>
readonlyname:string
Defined in: zaun/js/index.d.ts:650
parent
Section titled “parent”
readonlyparent:Channel
Defined in: zaun/js/index.d.ts:654
position
Section titled “position”
readonlyposition:number
Defined in: zaun/js/index.d.ts:653
recipient
Section titled “recipient”
readonlyrecipient:Member
Defined in: zaun/js/index.d.ts:688
DM: the other participant of a direct message, or null.
readonlytopic:string
Defined in: zaun/js/index.d.ts:652
readonlytype:"text"|"announcement"|"voice"|"category"|"forum"|"stage"
Defined in: zaun/js/index.d.ts:651
typing
Section titled “typing”
readonlytyping: {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).
typingMode
Section titled “typingMode”
readonlytypingMode:"named"|"anonymous"|"off"
Defined in: zaun/js/index.d.ts:660
Who sees typing here.
Methods
Section titled “Methods”autocomplete()
Section titled “autocomplete()”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.
Parameters
Section titled “Parameters”command
Section titled “command”string | ApplicationCommandData
options
Section titled “options”Returns
Section titled “Returns”Promise<string>
click()
Section titled “click()”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).
Parameters
Section titled “Parameters”message
Section titled “message”string
customId
Section titled “customId”string
values?
Section titled “values?”string[]
Returns
Section titled “Returns”Promise<string>
closeDm()
Section titled “closeDm()”closeDm():
Promise<void>
Defined in: zaun/js/index.d.ts:690
DM: closes a direct message for this member.
Returns
Section titled “Returns”Promise<void>
delete()
Section titled “delete()”delete():
Promise<void>
Defined in: zaun/js/index.d.ts:684
Returns
Section titled “Returns”Promise<void>
invokeCommand()
Section titled “invokeCommand()”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).
Parameters
Section titled “Parameters”command
Section titled “command”string | ApplicationCommandData
options?
Section titled “options?”target?
Section titled “target?”string
Returns
Section titled “Returns”Promise<string>
isCategory()
Section titled “isCategory()”isCategory():
boolean
Defined in: zaun/js/index.d.ts:669
Returns
Section titled “Returns”boolean
isText()
Section titled “isText()”isText():
boolean
Defined in: zaun/js/index.d.ts:667
Returns
Section titled “Returns”boolean
isVoice()
Section titled “isVoice()”isVoice():
boolean
Defined in: zaun/js/index.d.ts:668
Returns
Section titled “Returns”boolean
join()
Section titled “join()”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.
Parameters
Section titled “Parameters”options?
Section titled “options?”allowDirect?
Section titled “allowDirect?”boolean
selfDeaf?
Section titled “selfDeaf?”boolean
selfMute?
Section titled “selfMute?”boolean
track?
Section titled “track?”MediaStreamTrack
Returns
Section titled “Returns”Promise<VoiceConnection>
send()
Section titled “send()”send(
options):Promise<Message>
Defined in: zaun/js/index.d.ts:670
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<Message>
setTypingMode()
Section titled “setTypingMode()”setTypingMode(
mode):Promise<void>
Defined in: zaun/js/index.d.ts:666
typing: sets who sees typing here (MANAGE_CHANNELS).
Parameters
Section titled “Parameters”"named" | "anonymous" | "off"
Returns
Section titled “Returns”Promise<void>
startTyping()
Section titled “startTyping()”startTyping():
boolean
Defined in: zaun/js/index.d.ts:664
Says this member is typing; false (nothing sent) where typing is off.
Returns
Section titled “Returns”boolean
submitModal()
Section titled “submitModal()”submitModal(
modal,customId,components):Promise<string>
Defined in: zaun/js/index.d.ts:680
Submits a modal from modalOpen (its interaction is modal).
Parameters
Section titled “Parameters”string
customId
Section titled “customId”string
components
Section titled “components”object[]
Returns
Section titled “Returns”Promise<string>