Switch to NumPy style documentation.
This commit is contained in:
parent
b87dfccfce
commit
17171aaa60
@ -40,10 +40,9 @@ class Colour(object):
|
|||||||
| x != y | Checks if two colours are not equal. |
|
| x != y | Checks if two colours are not equal. |
|
||||||
+-----------+--------------------------------------+
|
+-----------+--------------------------------------+
|
||||||
|
|
||||||
Instance attributes:
|
Attributes
|
||||||
|
------------
|
||||||
.. attribute:: value
|
value : int
|
||||||
|
|
||||||
The raw integer colour value.
|
The raw integer colour value.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -33,42 +33,31 @@ class Invite(object):
|
|||||||
Depending on the way this object was created, some of the attributes can
|
Depending on the way this object was created, some of the attributes can
|
||||||
have a value of ``None``.
|
have a value of ``None``.
|
||||||
|
|
||||||
Instance attributes:
|
Attributes
|
||||||
|
-----------
|
||||||
.. attribute:: max_age
|
max_age : int
|
||||||
|
|
||||||
How long the before the invite expires in seconds. A value of 0 indicates that it doesn't expire.
|
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.
|
The URL fragment used for the invite. :attr:`xkcd` is also a possible fragment.
|
||||||
.. attribute:: server
|
server : :class:`Server`
|
||||||
|
The server the invite is for.
|
||||||
The :class:`Server` the invite is for.
|
revoked : bool
|
||||||
.. attribute:: revoked
|
Indicates if the invite has been revoked.
|
||||||
|
created_at : `datetime.datetime`
|
||||||
A boolean indicating if the invite has been revoked.
|
|
||||||
.. attribute:: created_at
|
|
||||||
|
|
||||||
A datetime object denoting the time the invite was created.
|
A datetime object denoting the time the invite was created.
|
||||||
.. attribute:: temporary
|
temporary : bool
|
||||||
|
Indicates that the invite grants temporary membership.
|
||||||
A boolean indicating that the invite grants temporary membership.
|
|
||||||
If True, members who joined via this invite will be kicked upon disconnect.
|
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.
|
How many times the invite has been used.
|
||||||
.. attribute:: max_uses
|
max_uses : int
|
||||||
|
|
||||||
How many times the invite can be used.
|
How many times the invite can be used.
|
||||||
.. attribute:: xkcd
|
xkcd : str
|
||||||
|
|
||||||
The URL fragment used for the invite if it is human readable.
|
The URL fragment used for the invite if it is human readable.
|
||||||
.. attribute:: inviter
|
inviter : :class:`User`
|
||||||
|
The user who created the invite.
|
||||||
The :class:`User` who created the invite.
|
channel : :class:`Channel`
|
||||||
.. attribute:: channel
|
The channel the invite is for.
|
||||||
|
|
||||||
The :class:`Channel` the invite is for.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
@ -37,8 +37,9 @@ class Object(object):
|
|||||||
receive this class rather than the actual data class. These cases are
|
receive this class rather than the actual data class. These cases are
|
||||||
extremely rare.
|
extremely rare.
|
||||||
|
|
||||||
.. attribute:: id
|
Attributes
|
||||||
|
-----------
|
||||||
|
id : str
|
||||||
The ID of the object.
|
The ID of the object.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -30,31 +30,23 @@ from .colour import Colour
|
|||||||
class Role(object):
|
class Role(object):
|
||||||
"""Represents a Discord role in a :class:`Server`.
|
"""Represents a Discord role in a :class:`Server`.
|
||||||
|
|
||||||
Instance attributes:
|
Attributes
|
||||||
|
----------
|
||||||
.. attribute:: id
|
id : str
|
||||||
|
|
||||||
The ID for the role.
|
The ID for the role.
|
||||||
.. attribute:: name
|
name : str
|
||||||
|
|
||||||
The name of the role.
|
The name of the role.
|
||||||
.. attribute:: permissions
|
permissions : :class:`Permissions`
|
||||||
|
Represents the role's permissions.
|
||||||
A :class:`Permissions` that represents the role's permissions.
|
color : :class:`Colour`
|
||||||
.. attribute:: color
|
Represents the role colour.
|
||||||
colour
|
hoist : bool
|
||||||
|
Indicates if the role will be displayed separately from other members.
|
||||||
A :class:`Colour` representing the role colour.
|
position : int
|
||||||
.. attribute:: hoist
|
|
||||||
|
|
||||||
A boolean representing if the role will be displayed separately from other members.
|
|
||||||
.. attribute:: position
|
|
||||||
|
|
||||||
The position of the role. This number is usually positive.
|
The position of the role. This number is usually positive.
|
||||||
.. attribute:: managed
|
managed : bool
|
||||||
|
Indicates if the role is managed by the server through some form of
|
||||||
A boolean indicating if the role is managed by the server through some form of integration
|
integrations such as Twitch.
|
||||||
such as Twitch.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
@ -39,19 +39,15 @@ class User(object):
|
|||||||
| str(x) | Returns the user's name. |
|
| str(x) | Returns the user's name. |
|
||||||
+-----------+------------------------------------+
|
+-----------+------------------------------------+
|
||||||
|
|
||||||
Instance attributes:
|
Attributes
|
||||||
|
-----------
|
||||||
.. attribute:: name
|
name : str
|
||||||
|
|
||||||
The user's username.
|
The user's username.
|
||||||
.. attribute:: id
|
id : str
|
||||||
|
|
||||||
The user's unique ID.
|
The user's unique ID.
|
||||||
.. attribute:: discriminator
|
discriminator : str or int
|
||||||
|
|
||||||
The user's discriminator. This is given when the username has conflicts.
|
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.
|
The avatar hash the user has. Could be None.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user