Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Message

Hierarchy

Index

Constructors

constructor

Properties

Readonly activity

activity: APIMessageActivityData | null

Sent with Rich Presence-related chat embeds.

since

0.0.1

Readonly application

application: APIMessageApplicationData | null

Sent with Rich Presence-related chat embeds.

since

0.0.1

Readonly attachments

attachments: Cache<string, MessageAttachment>

The attached files.

since

0.0.1

Readonly author

author: User

Author of this message.

since

0.0.1

Readonly channel

The channel the message was sent in.

since

0.0.1

Readonly client

client: Client

content

content: string

Contents of the message.

since

0.0.1

deleted

deleted: boolean = false

Whether the message is deleted.

since

0.0.1

editedTimestamp

editedTimestamp: number | null

When this message was edited (or null if never).

since

0.0.1

embeds

embeds: Embed[] = []

The embedded data.

since

0.0.1

flags

Describes extra features of the message.

since

0.0.1

see

https://discord.com/developers/docs/resources/channel#message-object-message-flags

Readonly guild

guild: Guild | null

The guild the message was sent in.

since

0.0.1

Readonly id

id: string

Id of the message.

since

0.0.1

Readonly member

member: GuildMember | null

The author's member data, always null if {@link Message#guild} is null.

since

0.0.1

Readonly mentions

mentions: MessageMentions

The mentions.

since

0.0.1

Optional Readonly nonce

nonce: string | null

Used for validating a message was sent.

since

0.0.1

pinned

pinned: boolean

Whether or not this message is pinned.

since

0.0.1

Readonly reactions

Reactions to the message.

since

0.0.1

Readonly reference

reference: APIMessageReferenceData | null

Reference data sent with crossposted messages.

since

0.0.1

tts

tts: boolean

Whether or not this was a TTS message.

since

0.0.1

Readonly type

type: MessageType

Optional Readonly webhookID

webhookID: string | null

If the message is generated by a webhook, this is the webhook's id.

since

0.0.1

Accessors

createdAt

  • get createdAt(): Date

createdTimestamp

  • get createdTimestamp(): number

deletable

  • get deletable(): boolean | null

editable

  • get editable(): boolean

editedAt

  • get editedAt(): Date | null

link

  • get link(): string

pinnable

  • get pinnable(): boolean | null

reactable

  • get reactable(): boolean | null

Methods

Protected _patch

  • _patch(data: Partial<APIMessageData>): this

awaitReactions

clone

  • clone(): this

crosspost

  • crosspost(): Promise<this>

delete

  • delete(requestOptions?: RequestOptions): Promise<this>

edit

pin

  • pin(): Promise<this>

toJSON

  • toJSON(): Record<string, any>

toString

  • toString(): string

unpin

  • unpin(): Promise<this>

valueOf

  • valueOf(): string

Generated using TypeDoc