aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-11-28 20:42:56 -0500
committerRapptz <[email protected]>2015-11-28 20:42:56 -0500
commitd243d0895c185504508e982cc45d113a939a53fb (patch)
tree3f827b2305a73da89fcb23cdc05989f45600d5f6 /docs
parentAdd warning for Message.mentions order being non-deterministic. (diff)
downloaddiscord.py-d243d0895c185504508e982cc45d113a939a53fb.tar.xz
discord.py-d243d0895c185504508e982cc45d113a939a53fb.zip
Add note about data classes instances.
Diffstat (limited to 'docs')
-rw-r--r--docs/api.rst16
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/api.rst b/docs/api.rst
index d5dc0e2f..7f289ce4 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -268,7 +268,21 @@ Utility Functions
Data Classes
--------------
-Some classes are just there to be data containers, this lists them. It should be assumed that *all* classes in this category are immutable and should not be modified.
+Some classes are just there to be data containers, this lists them.
+
+.. note::
+
+ With the exception of :class:`Object`, :class:`Colour`, and :class:`Permissions` the
+ data classes listed below are **not intended to be created by users** and are also
+ **read-only**.
+
+ For example, this means that you should not make your own :class:`User` instances
+ nor should you modify the :class:`User` instance yourself.
+
+ If you want to get one of these data classes instances they'd have to be through
+ the cache, and a common way of doing so is through the :func:`utils.find` function
+ or attributes of data classes that you receive from the events specified in the
+ :ref:`discord-api-events`.
.. autoclass:: Object
:members: