From 7321ecb114fbfaa268add194cd815864c10d0011 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Wed, 10 Jun 2026 16:37:56 +0200 Subject: [PATCH] fix: Edit both current user @me and by id if applicable --- discord/member.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/discord/member.py b/discord/member.py index 3773a18ee5..14fc3e9f9c 100644 --- a/discord/member.py +++ b/discord/member.py @@ -1062,11 +1062,14 @@ async def edit( "Can only edit avatar, banner, or bio for the bot's member." ) + data = None + if payload: data = await http.edit_member(guild_id, self.id, reason=reason, **payload) - elif bot_payload: + if bot_payload: data = await http.edit_member(guild_id, "@me", reason=reason, **bot_payload) - else: + + if data is None: return None return Member(data=data, guild=self.guild, state=self._state)