Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMessageBuilder

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

getAttachments

getAvatarUrl

  • getAvatarUrl(): string

getEditor

getEmojiAvatar

  • getEmojiAvatar(): string

getMessage

  • Gets the resulting message that has been built up to the point of calling it.

    Note: This will error out if the Room has not been defined.

    Returns IMessage

getRoom

getSender

getText

  • getText(): string

getUsernameAlias

  • getUsernameAlias(): string

removeAttachment

  • Removes an attachment at the given position (index). If there is no attachment at that position, there will be an error thrown.

    Parameters

    • position: number

      the index of the attachment to remove

    Returns IMessageBuilder

replaceAttachment

  • Replaces an attachment at the given position (index). If there is no attachment at that position, there will be an error thrown.

    Parameters

    • position: number

      the index of the attachment to replace

    • attachment: IMessageAttachment

      the attachment to replace with

    Returns IMessageBuilder

setAttachments

setAvatarUrl

  • Sets the url which to display for the avatar, this overwrites the current avatar whether it be the user's or an emoji one.

    Parameters

    • avatarUrl: string

      image url to use as the avatar

    Returns IMessageBuilder

setData

setEditor

setEmojiAvatar

  • Sets the emoji to use for the avatar, this overwrites the current avatar whether it be the user's or the avatar url provided.

    Parameters

    • emoji: string

      the emoji code

    Returns IMessageBuilder

setRoom

setSender

setText

setUsernameAlias

Generated using TypeDoc