Message¶
extends Equality
A Message object is used to represent the data of a message.
Attributes¶
channel¶
The channel the message was sent in, either a TextChannel or PMChannel.
server¶
The Server the message was sent in. Will be undefined if the message was sent in a PMChannel.
attachments¶
A raw array of attachment objects.
tts¶
Boolean, true if the message was text-to-speech.
embeds¶
A raw array of embed objects.
timestamp¶
Number, timestamp of when the message was sent.
everyoneMentioned¶
Boolean, true if @everyone
was mentioned.
id¶
String, ID of the message.
editedTimestamp¶
Timestamp on when the message was last edited, Number. Potentially null.
content¶
String, content of the message.
cleanContent¶
String, content of the message with valid user mentions (<@123>) replaced with “@username”.
pinned¶
Boolean, true if the message is pinned to its channel.
Functions¶
isMentioned(user)¶
Returns true if the given user was mentioned in the message.
- user - A User Resolvable
toString()¶
Returns the content of the Message.
delete(options, callback)¶
client.deleteMessage(message, options, callback
update(content, options, callback)¶
client.updateMessage(message, content, options, callback)
reply(content, options, callback)¶
client.reply(message, content, options, callback)
replyTTS(content, callback)¶
client.replyTTS(message, content, callback)
pin(callback)¶
client.pinMessage(message, callback)
unpin(callback)¶
client.unpinMessage(message, callback)