BotNode
Defined in: packages/core/src/message/node.ts:11
A platform-neutral node in a rendered bot tree.
Discord and Slack both use mutable trees that the renderer owns. Keeping the shape here means both hosts share the same node semantics and the same interaction bookkeeping.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BotNode(
tag,id,isText?):BotNode
Defined in: packages/core/src/message/node.ts:32
Parameters
Section titled “Parameters”string
string
isText?
Section titled “isText?”boolean = false
Returns
Section titled “Returns”BotNode
Properties
Section titled “Properties”attrs:
Record<string,string> ={}
Defined in: packages/core/src/message/node.ts:17
children
Section titled “children”children:
BotNode[] =[]
Defined in: packages/core/src/message/node.ts:16
customId
Section titled “customId”customId:
string|null=null
Defined in: packages/core/src/message/node.ts:28
The id the platform sends back on an interaction.
dispatch
Section titled “dispatch”dispatch:
Dispatch|null=null
Defined in: packages/core/src/message/node.ts:21
eventOptions
Section titled “eventOptions”eventOptions:
Readonly<Record<string,View.EventOptions>> ={}
Defined in: packages/core/src/message/node.ts:20
explicitCustomId
Section titled “explicitCustomId”explicitCustomId:
string|null=null
Defined in: packages/core/src/message/node.ts:26
The author’s custom id, before Arona wraps it for a session.
handlers
Section titled “handlers”handlers:
Readonly<Record<string,View.Handler<unknown,any>>> ={}
Defined in: packages/core/src/message/node.ts:19
id:
string
Defined in: packages/core/src/message/node.ts:24
The host-generated id, used for default block/action ids.
isText
Section titled “isText”
readonlyisText:boolean
Defined in: packages/core/src/message/node.ts:13
modalShown
Section titled “modalShown”modalShown:
boolean=false
Defined in: packages/core/src/message/node.ts:30
A platform-specific modal already shown for this node.
parent
Section titled “parent”parent:
BotNode|null=null
Defined in: packages/core/src/message/node.ts:15
props:
Record<string,unknown> ={}
Defined in: packages/core/src/message/node.ts:18
readonlytag:string
Defined in: packages/core/src/message/node.ts:12
text:
string=""
Defined in: packages/core/src/message/node.ts:14
Methods
Section titled “Methods”append()
Section titled “append()”append(
node):void
Defined in: packages/core/src/message/node.ts:50
Parameters
Section titled “Parameters”BotNode
Returns
Section titled “Returns”void
descendants()
Section titled “descendants()”descendants():
Generator<BotNode>
Defined in: packages/core/src/message/node.ts:90
Returns
Section titled “Returns”Generator<BotNode>
detach()
Section titled “detach()”detach():
void
Defined in: packages/core/src/message/node.ts:70
Returns
Section titled “Returns”void
insertBefore()
Section titled “insertBefore()”insertBefore(
node,anchor?):void
Defined in: packages/core/src/message/node.ts:57
Parameters
Section titled “Parameters”BotNode
anchor?
Section titled “anchor?”BotNode
Returns
Section titled “Returns”void
remove()
Section titled “remove()”remove(
node):void
Defined in: packages/core/src/message/node.ts:77
Parameters
Section titled “Parameters”BotNode
Returns
Section titled “Returns”void
textContent()
Section titled “textContent()”textContent():
string
Defined in: packages/core/src/message/node.ts:85
The text of this node and its text children.
Returns
Section titled “Returns”string