Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a message from a channel.

Hierarchy

Index

Constructors

constructor

  • new ChannelMessage(accountUser: User, fromUser: string, msg: string, t: number, id: string, channel: Channel, isJoin?: boolean, isLeave?: boolean): ChannelMessage

Properties

accountUser

accountUser: User

The user account related to this message.

channel

channel: Channel

The channel this message is contained within.

fromUser

fromUser: string

The user that send the message.

id

id: string

The id of the message.

isJoin

isJoin: boolean

Wether or not this message means someone joined.

isLeave

isLeave: boolean

Wether or not this message means someone left.

msg

msg: string

The message.

t

t: number

Unix timestamp in seconds.

Methods

isOwnMessage

  • isOwnMessage(): boolean

reply

  • reply(message: string): Promise<void>
  • Sends a reply.

    Example output: @fromUser hey

    Parameters

    • message: string

      The message

    Returns Promise<void>

toString

  • toString(): string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc