From 8d58c4cd9921d08ae760480d009722a0f11ea488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Radkowski?= Date: Thu, 3 Dec 2020 14:28:49 +0100 Subject: [PATCH] Fixed getting user's avatar url (#128) --- core/src/main/kotlin/entity/User.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/entity/User.kt b/core/src/main/kotlin/entity/User.kt index 2ce5ca0a0fa..4fe8405cbd8 100644 --- a/core/src/main/kotlin/entity/User.kt +++ b/core/src/main/kotlin/entity/User.kt @@ -121,7 +121,7 @@ open class User( val hash = data.avatar ?: return defaultUrl if (!isAnimated && format == Image.Format.GIF) return null - return "https://cdn.discordapp.com/avatars/${data.id}/$hash.${format.extension}" + return "https://cdn.discordapp.com/avatars/${data.id.value}/$hash.${format.extension}" } /** @@ -138,7 +138,7 @@ open class User( val hash = data.avatar ?: return defaultUrl if (!isAnimated && format == Image.Format.GIF) return null - return "https://cdn.discordapp.com/avatars/${data.id}/$hash.${format.extension}?size=${size.maxRes}" + return "https://cdn.discordapp.com/avatars/${data.id.value}/$hash.${format.extension}?size=${size.maxRes}" } /**