Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface for building out a message. Please note, that a room and sender must be associated otherwise you will NOT be able to successfully save the message object.

Hierarchy

  • IMessageBuilder

Index

Properties

kind

kind: MESSAGE

Methods

addAttachment

addBlocks

  • addBlocks(blocks: BlockBuilder | (IBlock | PlainText | Markdown | Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }> | PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>)[]; type: "actions" }> | LayoutBlockish<{ render: readonly (PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ type: "button"; text: PlainText; url?: string; value?: string; style?: "primary" | "danger"; }> | Actionable<{ type: "channels_select"; }> | ... 9 more ... | Actionable<...>)[]; type: "actions" }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]; type: "conditional"; when?: { engine?: readonly ("rocket.chat" | "livechat")[] } }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]): IMessageBuilder
  • Adds a block collection to the message's own collection

    Parameters

    • blocks: BlockBuilder | (IBlock | PlainText | Markdown | Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }> | PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>)[]; type: "actions" }> | LayoutBlockish<{ render: readonly (PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ type: "button"; text: PlainText; url?: string; value?: string; style?: "primary" | "danger"; }> | Actionable<{ type: "channels_select"; }> | ... 9 more ... | Actionable<...>)[]; type: "actions" }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]; type: "conditional"; when?: { engine?: readonly ("rocket.chat" | "livechat")[] } }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]

    Returns IMessageBuilder

addCustomField

  • Adds a custom field to the message. Note: This key can not already exist or it will throw an error. Note: The key must not contain a period in it, an error will be thrown.

    Parameters

    • key: string

      the name of the custom field

    • value: any

      the value of this custom field

    Returns IMessageBuilder

getAttachments

getAvatarUrl

  • getAvatarUrl(): string

getBlocks

  • getBlocks(): (IBlock | PlainText | Markdown | Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }> | PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>)[]; type: "actions" }> | LayoutBlockish<{ render: readonly (PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ type: "button"; text: PlainText; url?: string; value?: string; style?: "primary" | "danger"; }> | Actionable<{ type: "channels_select"; }> | ... 9 more ... | Actionable<...>)[]; type: "actions" }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]; type: "conditional"; when?: { engine?: readonly ("rocket.chat" | "livechat")[] } }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]
  • Gets the block collection of the message

    Returns (IBlock | PlainText | Markdown | Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }> | PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>)[]; type: "actions" }> | LayoutBlockish<{ render: readonly (PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ type: "button"; text: PlainText; url?: string; value?: string; style?: "primary" | "danger"; }> | Actionable<{ type: "channels_select"; }> | ... 9 more ... | Actionable<...>)[]; type: "actions" }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]; type: "conditional"; when?: { engine?: readonly ("rocket.chat" | "livechat")[] } }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]

getEditor

getEmojiAvatar

  • getEmojiAvatar(): string

getGroupable

  • getGroupable(): boolean

getMessage

getParseUrls

  • getParseUrls(): boolean

getRoom

getSender

getText

  • getText(): string

getThreadId

  • getThreadId(): string
  • Retrieves the threadId to which this message belongs, if any.

    If you would like to retrieve the actual message that the thread originated from, you can use the IMessageRead.getById() method

    Returns string

getUsernameAlias

  • getUsernameAlias(): string

removeAttachment

replaceAttachment

setAttachments

setAvatarUrl

setBlocks

  • setBlocks(blocks: BlockBuilder | (IBlock | PlainText | Markdown | Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }> | PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>)[]; type: "actions" }> | LayoutBlockish<{ render: readonly (PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ type: "button"; text: PlainText; url?: string; value?: string; style?: "primary" | "danger"; }> | Actionable<{ type: "channels_select"; }> | ... 9 more ... | Actionable<...>)[]; type: "actions" }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]; type: "conditional"; when?: { engine?: readonly ("rocket.chat" | "livechat")[] } }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]): IMessageBuilder
  • Sets the block collection of the message

    Parameters

    • blocks: BlockBuilder | (IBlock | PlainText | Markdown | Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }> | PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>)[]; type: "actions" }> | LayoutBlockish<{ render: readonly (PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview | LayoutBlockish<{ elements: readonly (Actionable<{ type: "button"; text: PlainText; url?: string; value?: string; style?: "primary" | "danger"; }> | Actionable<{ type: "channels_select"; }> | ... 9 more ... | Actionable<...>)[]; type: "actions" }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]; type: "conditional"; when?: { engine?: readonly ("rocket.chat" | "livechat")[] } }> | LayoutBlockish<{ elements: readonly ContextBlockElements[]; type: "context" }> | LayoutBlockish<{ type: "divider" }> | LayoutBlockish<{ altText: string; imageUrl: string; title?: PlainText; type: "image" }> | LayoutBlockish<{ element: Actionable<{ type: "channels_select" }> | Actionable<{ type: "conversations_select" }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | Actionable<{ initialValue?: number; maxValue?: number; minValue?: number; postLabel?: PlainText; preLabel?: PlainText; type: "linear_scale" }> | Actionable<{ type: "multi_channels_select" }> | Actionable<{ type: "multi_conversations_select" }> | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ type: "multi_users_select" }> | Actionable<{ initialValue?: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainText; type: "plain_text_input" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }> | Actionable<{ type: "users_select" }>; hint?: PlainText; label: PlainText; optional?: boolean; type: "input" }> | LayoutBlockish<{ accessory?: Actionable<{ style?: "primary" | "danger"; text: PlainText; type: "button"; url?: string; value?: string }> | Actionable<{ initialDate?: string; placeholder?: TextObject; type: "datepicker" }> | ImageElement | Actionable<{ initialOption?: Option[]; initialValue?: string[]; maxSelectItems?: number; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "multi_static_select" }> | Actionable<{ options: readonly Option[]; type: "overflow" }> | Actionable<{ initialOption?: Option; initialValue?: string; optionGroups?: readonly OptionGroup[]; options: readonly Option[]; placeholder: TextObject; type: "static_select" }>; fields?: readonly TextObject[]; text?: TextObject; type: "section" }> | LayoutBlockish<{ callId: string; type: "video_conf" }>)[]

    Returns IMessageBuilder

setData

setEditor

setEmojiAvatar

setGroupable

setParseUrls

setRoom

setSender

setText

setThreadId

setUpdateData

setUsernameAlias

Generated using TypeDoc