Message

Create a formatted Message Object

Constructor

new Message() → {Message}

Returns:
Type: 
Message
Example
const message = interaction.message; // returns the message object
const mentions = interaction.message.mentions; // returns the message mentions

Members

attachments :array

an array of attachments in the message

Type:
  • array

author :User

a user object of the message author

Type:

channelId :number|null

the channel id the message was sent in

Type:
  • number | null

components :array

an array of components in the message

Type:
  • array

content :string|null

the message content

Type:
  • string | null

editTimestamp :string|null

a timestamp when the message got edited if the message got edited

Type:
  • string | null

embeds :array

an array of embeds in the message

Type:
  • array

flags :number

the message flags

Type:
  • number

id :number|null

the message id

Type:
  • number | null

mentionEveryone :boolean

if the message mention everyone or not

Type:
  • boolean

mentionRoles :array

the role mentions in the message

Type:
  • array

mentions :array

an array of mentions in the message

Type:
  • array

pinned :boolean

if the message is pinned or not

Type:
  • boolean

timestamp :null

the timestamp the message was sent at

Type:
  • null

tts :boolean

if the message is a tts message or not

Type:
  • boolean

type :number

the type of the message

Type:
  • number