Browse Source
Make arguments positional only in 2 get methods
- Member.get_role
- Guild.get_member
pull/7480/head
Izhar Ahmad
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
discord/guild.py
-
discord/member.py
|
@ -736,7 +736,7 @@ class Guild(Hashable): |
|
|
"""List[:class:`Member`]: A list of members that belong to this guild.""" |
|
|
"""List[:class:`Member`]: A list of members that belong to this guild.""" |
|
|
return list(self._members.values()) |
|
|
return list(self._members.values()) |
|
|
|
|
|
|
|
|
def get_member(self, user_id: int) -> Optional[Member]: |
|
|
def get_member(self, user_id: int, /) -> Optional[Member]: |
|
|
"""Returns a member with the given ID. |
|
|
"""Returns a member with the given ID. |
|
|
|
|
|
|
|
|
Parameters |
|
|
Parameters |
|
|
|
@ -890,7 +890,7 @@ class Member(discord.abc.Messageable, _UserTag): |
|
|
for role in roles: |
|
|
for role in roles: |
|
|
await req(guild_id, user_id, role.id, reason=reason) |
|
|
await req(guild_id, user_id, role.id, reason=reason) |
|
|
|
|
|
|
|
|
def get_role(self, role_id: int) -> Optional[Role]: |
|
|
def get_role(self, role_id: int, /) -> Optional[Role]: |
|
|
"""Returns a role with the given ID from roles which the member has. |
|
|
"""Returns a role with the given ID from roles which the member has. |
|
|
|
|
|
|
|
|
.. versionadded:: 2.0 |
|
|
.. versionadded:: 2.0 |
|
|