aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/colour.py7
-rw-r--r--discord/invite.py47
-rw-r--r--discord/object.py5
-rw-r--r--discord/role.py36
-rw-r--r--discord/user.py16
5 files changed, 44 insertions, 67 deletions
diff --git a/discord/colour.py b/discord/colour.py
index c055ef7c..169e6a04 100644
--- a/discord/colour.py
+++ b/discord/colour.py
@@ -40,10 +40,9 @@ class Colour(object):
| x != y | Checks if two colours are not equal. |
+-----------+--------------------------------------+
- Instance attributes:
-
- .. attribute:: value
-
+ Attributes
+ ------------
+ value : int
The raw integer colour value.
"""
diff --git a/discord/invite.py b/discord/invite.py
index 21f47a83..5b59e20a 100644
--- a/discord/invite.py
+++ b/discord/invite.py
@@ -33,42 +33,31 @@ class Invite(object):
Depending on the way this object was created, some of the attributes can
have a value of ``None``.
- Instance attributes:
-
- .. attribute:: max_age
-
+ Attributes
+ -----------
+ max_age : int
How long the before the invite expires in seconds. A value of 0 indicates that it doesn't expire.
- .. attribute:: code
-
+ code : str
The URL fragment used for the invite. :attr:`xkcd` is also a possible fragment.
- .. attribute:: server
-
- The :class:`Server` the invite is for.
- .. attribute:: revoked
-
- A boolean indicating if the invite has been revoked.
- .. attribute:: created_at
-
+ server : :class:`Server`
+ The server the invite is for.
+ revoked : bool
+ Indicates if the invite has been revoked.
+ created_at : `datetime.datetime`
A datetime object denoting the time the invite was created.
- .. attribute:: temporary
-
- A boolean indicating that the invite grants temporary membership.
+ temporary : bool
+ Indicates that the invite grants temporary membership.
If True, members who joined via this invite will be kicked upon disconnect.
- .. attribute:: uses
-
+ uses : int
How many times the invite has been used.
- .. attribute:: max_uses
-
+ max_uses : int
How many times the invite can be used.
- .. attribute:: xkcd
-
+ xkcd : str
The URL fragment used for the invite if it is human readable.
- .. attribute:: inviter
-
- The :class:`User` who created the invite.
- .. attribute:: channel
-
- The :class:`Channel` the invite is for.
+ inviter : :class:`User`
+ The user who created the invite.
+ channel : :class:`Channel`
+ The channel the invite is for.
"""
def __init__(self, **kwargs):
diff --git a/discord/object.py b/discord/object.py
index 2c33068c..d073ef15 100644
--- a/discord/object.py
+++ b/discord/object.py
@@ -37,8 +37,9 @@ class Object(object):
receive this class rather than the actual data class. These cases are
extremely rare.
- .. attribute:: id
-
+ Attributes
+ -----------
+ id : str
The ID of the object.
"""
diff --git a/discord/role.py b/discord/role.py
index 376be2c9..3e43270d 100644
--- a/discord/role.py
+++ b/discord/role.py
@@ -30,31 +30,23 @@ from .colour import Colour
class Role(object):
"""Represents a Discord role in a :class:`Server`.
- Instance attributes:
-
- .. attribute:: id
-
+ Attributes
+ ----------
+ id : str
The ID for the role.
- .. attribute:: name
-
+ name : str
The name of the role.
- .. attribute:: permissions
-
- A :class:`Permissions` that represents the role's permissions.
- .. attribute:: color
- colour
-
- A :class:`Colour` representing the role colour.
- .. attribute:: hoist
-
- A boolean representing if the role will be displayed separately from other members.
- .. attribute:: position
-
+ permissions : :class:`Permissions`
+ Represents the role's permissions.
+ color : :class:`Colour`
+ Represents the role colour.
+ hoist : bool
+ Indicates if the role will be displayed separately from other members.
+ position : int
The position of the role. This number is usually positive.
- .. attribute:: managed
-
- A boolean indicating if the role is managed by the server through some form of integration
- such as Twitch.
+ managed : bool
+ Indicates if the role is managed by the server through some form of
+ integrations such as Twitch.
"""
def __init__(self, **kwargs):
diff --git a/discord/user.py b/discord/user.py
index 3d3a38c5..35f39d94 100644
--- a/discord/user.py
+++ b/discord/user.py
@@ -39,19 +39,15 @@ class User(object):
| str(x) | Returns the user's name. |
+-----------+------------------------------------+
- Instance attributes:
-
- .. attribute:: name
-
+ Attributes
+ -----------
+ name : str
The user's username.
- .. attribute:: id
-
+ id : str
The user's unique ID.
- .. attribute:: discriminator
-
+ discriminator : str or int
The user's discriminator. This is given when the username has conflicts.
- .. attribute:: avatar
-
+ avatar : str
The avatar hash the user has. Could be None.
"""