Browse Source

Better docs

pull/10386/head
Soheab 6 months ago
parent
commit
a374276310
  1. 5
      discord/abc.py
  2. 15
      discord/invite.py

5
discord/abc.py

@ -1330,11 +1330,12 @@ class GuildChannel:
roles: Optional[List[:class:`~discord.abc.Snowflake`]] roles: Optional[List[:class:`~discord.abc.Snowflake`]]
A list of roles that should be granted to the users joining via this invite. A list of roles that should be granted to the users joining via this invite.
Requires :attr:`~discord.Permissions.manage_guild` permission. Requires :attr:`~discord.Permissions.manage_guild` permission and cannot
assign roles with higher permissions than the bot.
.. versionadded:: 2.7 .. versionadded:: 2.7
users: Optional[List[:class:`~discord.abc.Snowflake`]] users: Optional[List[:class:`~discord.abc.Snowflake`]]
A list of user IDs that should be able to access this invite. A list of users that are allowed to join via this invite.
Requires :attr:`~discord.Permissions.manage_guild` permission. Requires :attr:`~discord.Permissions.manage_guild` permission.

15
discord/invite.py

@ -408,8 +408,11 @@ class Invite(Hashable):
.. versionadded:: 2.0 .. versionadded:: 2.0
roles: List[:class:`Role`] roles: List[:class:`Role`]
A list of roles the invite grants access to. Only available if the A list of roles that are granted to users joining via this invite.
invite's guild is cached.
This is only filled if the bot is in the guild where the invite belongs.
.. versionadded:: 2.7
""" """
__slots__ = ( __slots__ = (
@ -646,14 +649,14 @@ class Invite(Hashable):
async def fetch_target_users(self) -> list[int]: async def fetch_target_users(self) -> list[int]:
"""|coro| """|coro|
Fetches the target users CSV file for this invite. Fetches the users that are allowed to join via this invite.
Requires the :attr:`~Permissions.manage_guild` permission. Requires the :attr:`~Permissions.manage_guild` permission.
Returns Returns
-------- --------
List[:class:`int`] List[:class:`int`]
A list of user IDs representing the target users. A list of user IDs.
Raises Raises
------- -------
@ -678,8 +681,8 @@ class Invite(Hashable):
Returns Returns
-------- --------
:class:`InviteTargetUsersJobStatus` :class:`InviteTargetUsersJobErrorStatus`
A dictionary containing the status of the target users job. The status of the target users job.
Raises Raises
------- -------

Loading…
Cancel
Save