From 4c3ce8fb85e5c901589d056996d6f81dee8dda4b Mon Sep 17 00:00:00 2001 From: Dep <70801324+Depreca1ed@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:13:54 +0530 Subject: [PATCH] Fix Member.roles having None members Signed-off-by: Depreca1ed <70801324+Depreca1ed@users.noreply.github.com> --- discord/member.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/discord/member.py b/discord/member.py index 2de8fbfc1..8dee33546 100644 --- a/discord/member.py +++ b/discord/member.py @@ -561,7 +561,9 @@ class Member(discord.abc.Messageable, _UserTag): role = g.get_role(role_id) if role: result.append(role) - result.append(g.default_role) + default_role = g.default_role + if default_role: + result.append(default_role) result.sort() return result