From efec816de2a9783d98f07aaf02ad7d32cba2b7b9 Mon Sep 17 00:00:00 2001 From: Izhar Ahmad <54180221+nerdguyahmad@users.noreply.github.com> Date: Thu, 26 Aug 2021 05:52:20 +0500 Subject: [PATCH] Make arguments positional only in 2 get methods - Member.get_role - Guild.get_member --- discord/guild.py | 2 +- discord/member.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/guild.py b/discord/guild.py index b00f9ebca..41545f773 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -736,7 +736,7 @@ class Guild(Hashable): """List[:class:`Member`]: A list of members that belong to this guild.""" 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. Parameters diff --git a/discord/member.py b/discord/member.py index 058b39b21..a8c868d87 100644 --- a/discord/member.py +++ b/discord/member.py @@ -890,7 +890,7 @@ class Member(discord.abc.Messageable, _UserTag): for role in roles: 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. .. versionadded:: 2.0