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`]]
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
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.

15
discord/invite.py

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

Loading…
Cancel
Save