From 09dbeb97667d12adcfd9fab69fc14b2811a6abdb Mon Sep 17 00:00:00 2001 From: runebaas Date: Tue, 24 Nov 2020 21:40:33 +0100 Subject: [PATCH] Fix a stupid bug with the !avatar command --- src/Bot/Commands/Utils/AvatarGetter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bot/Commands/Utils/AvatarGetter.cs b/src/Bot/Commands/Utils/AvatarGetter.cs index 6585a75..2aa6b07 100644 --- a/src/Bot/Commands/Utils/AvatarGetter.cs +++ b/src/Bot/Commands/Utils/AvatarGetter.cs @@ -21,8 +21,8 @@ namespace Geekbot.Bot.Commands.Utils { try { - if (user == null) user = Context.User; - var url = user.GetAvatarUrl().Replace("128", "1024"); + user ??= Context.User; + var url = user.GetAvatarUrl(ImageFormat.Auto, 1024); await ReplyAsync(url); } catch (Exception e)