Class Message

Message component, with all its methods and declarations.

Hierarchy

Constructors

Properties

_lastMessageID: null | string

ID of the last message created with the message itself.

channelID: string

ID of the channel on which the message was sent.

client: Client

Bot's client.

content: undefined | string

Content of the message.

createdAt: Date

When the message was created.

deletedAt: null | Date

When the message was deleted.

editedTimestamp: null | Date

Timestamp at which this message was last edited.

embeds?: APIEmbedOptions[] | []

Array of message embed.

guildID: null | string

ID of the server on which the message was sent.

id: string | number

Item ID

isPrivate: undefined | boolean
isSilent: undefined | boolean
memberID: string

ID of the message author.

mentions: APIMentions

object containing all mentioned users.

oldContent: null | string

Old content of the message, if edited.

replyMessageIds: string[]

The IDs of the message replied by the message.

type: string

Message type.

webhookID?: null | string

ID of the webhook used to send this message. (if sent by a webhook)

Accessors

  • get member(): undefined | User | Member | Promise<Member>
  • Retrieve message's member, if cached. If there is no cached member or user, this will make a request which returns a Promise. If the request fails, this will throw an error or return you undefined as a value.

    Returns undefined | User | Member | Promise<Member>

Methods

  • Add a reaction to this message.

    Parameters

    • reaction: number

      ID of a reaction/emote.

    Returns Promise<void>

  • Delete the last message sent with the message itself.

    Returns Promise<void>

  • Delete the message's original response message.

    Returns Promise<void>

  • Remove a reaction from this message.

    Parameters

    • reaction: number

      ID of a reaction/emote.

    Returns Promise<void>