Skip to content

Function: promptOf()

promptOf(inbound): string | null

The text a message activity carries, or null when it carries none.

A channel sends plenty of activities with no usable text (a typing indicator, a conversationUpdate when someone joins, or a message whose payload is only an attachment). Those are not errors - they simply produce no reply - so this returns null rather than throwing.

object[] = ...

{ id: string; } = ...

string = ...

{ id: string; name?: string; } = ...

string = ...

string = ...

string = ...

{ id: string; name?: string; } = ...

string = ...

string = ...

string = ...

string = ...

"message" | "conversationUpdate" | "typing" = ...

string | null