Browse Source

Fix target_role_ids type to use Sequence[Snowflake]

pull/10441/head
SassGuard 3 months ago
parent
commit
71f175dc64
  1. 4
      discord/abc.py
  2. 2
      discord/http.py

4
discord/abc.py

@ -1282,7 +1282,7 @@ class GuildChannel:
target_type: Optional[InviteTarget] = None,
target_user: Optional[User] = None,
target_application_id: Optional[int] = None,
target_role_ids: Optional[List[int]] = None,
target_role_ids: Optional[Sequence[Snowflake]] = None,
guest: bool = False,
) -> Invite:
"""|coro|
@ -1322,7 +1322,7 @@ class GuildChannel:
The id of the embedded application for the invite, required if ``target_type`` is :attr:`.InviteTarget.embedded_application`.
.. versionadded:: 2.0
target_role_ids: Optional[List[:class:`int`]]
target_role_ids: Optional[Sequence[:class:`abc.Snowflake`]]
A list of role IDs to assign to the user upon accepting this invite.
guest: :class:`bool`

2
discord/http.py

@ -1854,7 +1854,7 @@ class HTTPClient:
target_type: Optional[invite.InviteTargetType] = None,
target_user_id: Optional[Snowflake] = None,
target_application_id: Optional[Snowflake] = None,
target_role_ids: Optional[List[Snowflake]] = None,
target_role_ids: Optional[Sequence[Snowflake]] = None,
flags: Optional[int] = None,
) -> Response[invite.Invite]:
r = Route('POST', '/channels/{channel_id}/invites', channel_id=channel_id)

Loading…
Cancel
Save