Options
All
  • Public
  • Public/Protected
  • All
Menu

Store Chatlog and provides convenient methods.

Hierarchy

  • TalkChatData

Index

Constructors

constructor

Accessors

chat

  • get chat(): Readonly<Chatlog>

isShout

  • get isShout(): boolean

medias

mentions

  • get mentions(): MentionStruct[]

originalType

  • get originalType(): number
  • The chat object's type property has the type value bit masked when the chat is deleted.

    Returns number

    the original chat type

sendAt

  • get sendAt(): Date

text

  • get text(): string

urls

  • get urls(): string[]
  • Get url list in chat. Can be used to generate url preview. It is not for detecting urls.

    Returns string[]

Methods

attachment

  • attachment<T>(): Partial<T>
  • Almost same as chat.attachment but supports typing and null safe.

    Type parameters

    • T

    Returns Partial<T>

    non null attachment object

forwardTo

getSenderInfo

  • getSenderInfo(channel: TalkChannel): undefined | ChannelUserInfo
  • Get channel user info from channel. this is equivalent of calling channel.getUserInfo(data.chat.sender);

    Parameters

    Returns undefined | ChannelUserInfo

isDeleted

  • isDeleted(): boolean

isMentioned

  • isMentioned(...users: ChannelUser[]): boolean
  • Check if any users are mentioned.

    Parameters

    • Rest ...users: ChannelUser[]

      Users to find

    Returns boolean

    true if anyone is mentioned

Generated using TypeDoc