mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-11-04 07:22:50 +00:00 
			
		
		
		
	Switch to NumPy style documentation.
This commit is contained in:
		@@ -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.
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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):
 | 
			
		||||
 
 | 
			
		||||
@@ -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.
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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):
 | 
			
		||||
 
 | 
			
		||||
@@ -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.
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user