Represents a message from a channel.

### Hierarchy

- Message
  - ChannelMessage

## Index

### Constructors

- constructor

### Properties

- accountUser
- channel
- fromUser
- id
- isJoin
- isLeave
- msg
- t

### Methods

- isOwnMessage
- reply
- toString

## Constructors

### constructor

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

- Overrides Message.constructor

  - Defined in lib/channel.message.ts:20

  #### Parameters

  - ##### accountUser: User

  - ##### fromUser: string

  - ##### msg: string

  - ##### t: number

  - ##### id: string

  - ##### channel: Channel

  - ##### Default value isJoin: boolean = false

  - ##### Default value isLeave: boolean = false

  #### Returns ChannelMessage

## Properties

### accountUser

accountUser: User

Inherited from Message.accountUser

- Defined in lib/message.ts:28

The user account related to this message.

### channel

channel: Channel

- Defined in lib/channel.message.ts:12

The channel this message is contained within.

### fromUser

fromUser: string

Inherited from Message.fromUser

- Defined in lib/message.ts:12

The user that send the message.

### id

id: string

Inherited from Message.id

- Defined in lib/message.ts:24

The id of the message.

### isJoin

isJoin: boolean

- Defined in lib/channel.message.ts:16

Wether or not this message means someone joined.

### isLeave

isLeave: boolean

- Defined in lib/channel.message.ts:20

Wether or not this message means someone left.

### msg

msg: string

Inherited from Message.msg

- Defined in lib/message.ts:16

The message.

### t

t: number

Inherited from Message.t

- Defined in lib/message.ts:20

Unix timestamp in seconds.

## Methods

### isOwnMessage

- isOwnMessage(): boolean

- Inherited from Message.isOwnMessage

  - Defined in lib/message.ts:41

  Wether this message is sent by the account user.

  #### Returns boolean

### reply

- reply(message: string): Promise<void>

- - Defined in lib/channel.message.ts:36

  Sends a reply.

  Example output: @fromUser hey

  #### Parameters

  - ##### message: string

    The message

  #### Returns Promise<void>

### toString

- toString(): string

- - Defined in lib/channel.message.ts:43

  Return a string with the message formatted.

  #### Returns string

Generated using TypeDoc