Interface: ComposerApi
Writing into the composer, never sending.
Properties
insertDraft
readonlyinsertDraft: (text) =>Promise<void>
Puts text in the open chat's composer for the user to edit and send. Needs composer:insert-draft.
Parameters
text
string
Returns
Promise<void>
readDraft
readonlyreadDraft: () =>Promise<string|null>
What the user typed in the open chat's composer so far, or null when no chat is open. Needs composer:read-draft.
Returns
Promise<string | null>
replaceDraft
readonlyreplaceDraft: (text) =>Promise<void>
Replaces what the user typed in the open chat's composer with text, as a rewritten draft for them to edit and send. Needs composer:insert-draft.
Parameters
text
string
Returns
Promise<void>