.log userupdated will properly log gif avatar changes now
This commit is contained in:
parent
cae1df82b8
commit
9050291e85
@ -154,10 +154,10 @@ namespace NadekoBot.Modules.Administration.Services
|
|||||||
.WithFooter(fb => fb.WithText(CurrentTime(g)))
|
.WithFooter(fb => fb.WithText(CurrentTime(g)))
|
||||||
.WithOkColor();
|
.WithOkColor();
|
||||||
|
|
||||||
if (Uri.IsWellFormedUriString(before.GetAvatarUrl(), UriKind.Absolute))
|
if (Uri.IsWellFormedUriString(before.RealAvatarUrl(), UriKind.Absolute))
|
||||||
embed.WithThumbnailUrl(before.GetAvatarUrl());
|
embed.WithThumbnailUrl(before.RealAvatarUrl());
|
||||||
if (Uri.IsWellFormedUriString(after.GetAvatarUrl(), UriKind.Absolute))
|
if (Uri.IsWellFormedUriString(after.RealAvatarUrl(), UriKind.Absolute))
|
||||||
embed.WithImageUrl(after.GetAvatarUrl());
|
embed.WithImageUrl(after.RealAvatarUrl());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -44,6 +44,6 @@ namespace NadekoBot.Extensions
|
|||||||
public static string RealAvatarUrl(this DiscordUser usr) =>
|
public static string RealAvatarUrl(this DiscordUser usr) =>
|
||||||
usr.AvatarId.StartsWith("a_")
|
usr.AvatarId.StartsWith("a_")
|
||||||
? $"{DiscordConfig.CDNUrl}avatars/{usr.UserId}/{usr.AvatarId}.gif"
|
? $"{DiscordConfig.CDNUrl}avatars/{usr.UserId}/{usr.AvatarId}.gif"
|
||||||
: $"{DiscordConfig.CDNUrl}avatars/{usr.UserId}/{usr.AvatarId}.png";
|
: ((IUser)usr).GetAvatarUrl(ImageFormat.Auto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user