Message

Constructor

new Message(messagedata, client)

Properties

client

The client the message was sent from, if any.

Returns - Client

id

The id of the message

Returns - Numberarrow-up-right

type

The type of the message

Returns - messageTypearrow-up-right

content

the content of the message

Returns - Stringarrow-up-right

channelID

The id of the channel the message was sent in, if any

Returns - Numberarrow-up-right

author

The author of the message, returned exactly by discord

Returns - messageAuthorarrow-up-right

attachments

The attachments that are in the message, if any

Returns - Arrayarrow-up-right

embeds

The embeds sent in the message, if any

Returns - Arrayarrow-up-right

mentions

The mentions of users in the message

Returns - Arrayarrow-up-right

mentionedRoles

Roles mentioned in the message

Returns - Arrayarrow-up-right

pinned

Whether or not the message is pinned to the channel

Returns - Booleanarrow-up-right

mentionedEveryone

Whether or not everyone was mentioned in the channel

Returns - Booleanarrow-up-right

tts

Whether or not the message was a tts(text-to-speech) message.

Returns - Booleanarrow-up-right

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 - messageFlagsarrow-up-right

referencedMessage

The reference data for crossposted messages, if any.

Returns - referenceMessagearrow-up-right

Methods

react(emoji)

React to the message with the provided emoji

circle-info

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

circle-info

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

circle-info

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

circle-info

This will only work in a text channel or on a message search up

Returns - messageUnpingedObject

Last updated