Class Message

Hierarchy

  • Message

Constructors

Properties

#inThread: boolean
_webhook: Webhook
applicationID?: string

If the webhook is application-owned, this will return the application's ID.

attachments?: AttachmentData[]

File attachments on the message.

author: User

The author of the message.

channelID: string

The channel this message belongs to.

  • Text
  • Voice
  • News
  • Thread

Webhooks do not have enough information to determine the channel type by themselves.

components?: ComponentRow[]

Attached message components

content?: string

String content of the message.

editedTimestamp?: string

When the message was edited. (null if never)

embeds?: Embed[]

Embeds attached to the message.

flags?: MessageFlags

Message flags bitfield.

id: string

The ID of the message.

mentionEveryone?: boolean

Whether this message mentions everyone.

mentions?: User[]

Any user entries that were mentioned in the message (sent from Discord).

mentionsRoles?: string[]

Any roles that were mentioned in the message (sent from Discord).

pinned?: boolean

Is this message pinned? (Applies to all channel types).

position?: number

(Forum Post / Public Thread) Approximate position of message entry in a thread.

timestamp: string

When the message was created.

tts: boolean

Whether the message was sent with text-to-speech enabled.

webhookID?: string

The webhook that sent the message.

Methods

  • Removes the message, uses the channelID to target the thread... if it is in one.

    Returns

    void

    Returns Promise<void>

Generated using TypeDoc