From 8318dfe9886b1ff8c584beadd23cb757aab58155 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 26 Jan 2024 12:16:13 +0100 Subject: [PATCH] Fixed user avatar url --- bot/src/bot_data/model/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/bot_data/model/user.py b/bot/src/bot_data/model/user.py index 697511a2..e9c3b30b 100644 --- a/bot/src/bot_data/model/user.py +++ b/bot/src/bot_data/model/user.py @@ -178,7 +178,7 @@ class User(TableABC): def profile_picture_url(self, bot: DiscordBotServiceABC) -> str: guild = bot.get_guild(self.server.discord_id) user = guild.get_member(self._discord_id) - return None if user is None else user.avatar.url + return None if user is None or user.avatar is None else user.avatar.url @staticmethod def get_select_all_string() -> str: