mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Fix SKU return type and documentation
This commit is contained in:
parent
e1c1a72a50
commit
ef0944047e
@ -2441,7 +2441,7 @@ class HTTPClient:
|
|||||||
json=payload,
|
json=payload,
|
||||||
)
|
)
|
||||||
|
|
||||||
def delete_entitlement(self, application_id: Snowflake, entitlement_id: Snowflake) -> Response[sku.Entitlement]:
|
def delete_entitlement(self, application_id: Snowflake, entitlement_id: Snowflake) -> Response[None]:
|
||||||
return self.request(
|
return self.request(
|
||||||
Route(
|
Route(
|
||||||
'DELETE',
|
'DELETE',
|
||||||
|
@ -92,7 +92,7 @@ class SKU:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def flags(self) -> SKUFlags:
|
def flags(self) -> SKUFlags:
|
||||||
"""Returns the flags of the SKU."""
|
""":class:`SKUFlags`: Returns the flags of the SKU."""
|
||||||
return SKUFlags._from_value(self._flags)
|
return SKUFlags._from_value(self._flags)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -158,14 +158,14 @@ class Entitlement:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def user(self) -> Optional[User]:
|
def user(self) -> Optional[User]:
|
||||||
"""The user that is granted access to the entitlement"""
|
"""Optional[:class:`User`]: The user that is granted access to the entitlement."""
|
||||||
if self.user_id is None:
|
if self.user_id is None:
|
||||||
return None
|
return None
|
||||||
return self._state.get_user(self.user_id)
|
return self._state.get_user(self.user_id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def guild(self) -> Optional[Guild]:
|
def guild(self) -> Optional[Guild]:
|
||||||
"""The guild that is granted access to the entitlement"""
|
"""Optional[:class:`Guild`]: The guild that is granted access to the entitlement."""
|
||||||
return self._state._get_guild(self.guild_id)
|
return self._state._get_guild(self.guild_id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
16
docs/api.rst
16
docs/api.rst
@ -4804,14 +4804,6 @@ SKU
|
|||||||
.. autoclass:: SKU()
|
.. autoclass:: SKU()
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
SKUFlags
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
.. attributetable:: SKUFlags
|
|
||||||
|
|
||||||
.. autoclass:: SKUFlags()
|
|
||||||
:members:
|
|
||||||
|
|
||||||
Entitlement
|
Entitlement
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
@ -5189,6 +5181,14 @@ RoleFlags
|
|||||||
.. autoclass:: RoleFlags
|
.. autoclass:: RoleFlags
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
SKUFlags
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. attributetable:: SKUFlags
|
||||||
|
|
||||||
|
.. autoclass:: SKUFlags()
|
||||||
|
:members:
|
||||||
|
|
||||||
ForumTag
|
ForumTag
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user