Message
Constructor
Properties
client
The client the message was sent from, if any.
Returns - Client
id
The id of the message
Returns - Number
type
The type of the message
Returns - messageType
content
the content of the message
Returns - String
channelID
The id of the channel the message was sent in, if any
Returns - Number
author
The author of the message, returned exactly by discord
Returns - messageAuthor
attachments
The attachments that are in the message, if any
Returns - Array
embeds
The embeds sent in the message, if any
Returns - Array
mentions
The mentions of users in the message
Returns - Array
mentionedRoles
Roles mentioned in the message
Returns - Array
pinned
Whether or not the message is pinned to the channel
Returns - Boolean
mentionedEveryone
Whether or not everyone was mentioned in the channel
Returns - Boolean
tts
Whether or not the message was a tts(text-to-speech) message.
Returns - Boolean
createdTimestamp
The timestamp of the time the message was sent
Returns - Time
editedTimestamp
The timestamp of the time the message was last edited, if any
Returns - ?Time
flags
The flags of the message
Returns - messageFlags
referencedMessage
The reference data for crossposted messages, if any.
Returns - referenceMessage
Methods
react(emoji)
React to the message with the provided emoji
emoji must not be an custom emoji. Method for that will be coming soon
Param
Required?
Description
emoji
true
The emoji to be reacted to the message
Returns - emoji
delete()
Deletes the message
Returns - messageDeletedObject
edit(newmessage)
Edit the message
This method will only work when editing the message the bot sent
Param
Required?
Description
newmessage
true
The message to edit to
Type: String or EmbedObject
pin()
Pin the message to the channel its sent in
This will only work in a text channel or on a message search up
Returns - messagePingedObject
unpin()
Unpin the message if the message is pinged
This will only work in a text channel or on a message search up
Returns - messageUnpingedObject
Last updated