Files
discord.js/docs/docs_message.rst
Manuel Kraus ad84aa84b8 Some doc fixes (#315)
#docs_client.rst:
- 257: Add proper eplanation of callback, like in every other method
- 433: Fix linking for Invite Resolvable

#docs_message.rst:
- 90 : Replace ':' with '-', just for consistency with the others

#docs_resolvables.rst:
- 92 : String doesn't link to anything (?) -> Link removed

#docs_servers.rst:
- 109 : Properly indent code-block because it didn't show at all on rtfd

#docs_serverchannel.rst:
- 53 : Remove doulbe '`' causing it not to display properly

#docs_voiceconnection.rst:
- 67 : Remove 'currently, it currently

#docs_voiceconnection.rst:
- 32 : Add links for Role Resolvable, as used in client#addMemberToRole,
client#removeMemberFromRole and client#memberHasRole
2016-05-02 13:05:09 -07:00

91 lines
1.3 KiB
ReStructuredText

.. include:: ./vars.rst
Message
=======
**extends** Equality_
A Message object is used to represent the data of a message.
--------
Attributes
----------
channel
~~~~~~~
The channel the message sent in, either a TextChannel_ or PMChannel_.
client
~~~~~~
The Client_ that cached the message.
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.
author
~~~~~~
**Alias:** `sender`
The User_ that sent the message.
content
~~~~~~~
`String`, content of the message.
cleanContent
~~~~~~~
`String`, content of the message with valid user mentions (<@123>) replaced with "@username".
mentions
~~~~~~~~
A array of User_ objects that were mentioned in the message.
Functions
---------
isMentioned(user)
~~~~~~~~~~~~~~~~~
Returns true if the given user was mentioned in the message.
- **user** - A `User Resolvable`_