Skip to content

Commit

Permalink
[ci skip] Cache icon URL in embed branding
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbooth committed Mar 11, 2023
1 parent b82cc8e commit c9155a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Hammer/Extensions/DiscordEmbedBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ public static DiscordEmbedBuilder WithGuildInfo(
ArgumentNullException.ThrowIfNull(embedBuilder);
ArgumentNullException.ThrowIfNull(guild);

embedBuilder.WithFooter(guild.Name, iconUrl: guild.GetIconUrl(ImageFormat.Png));
if (addThumbnail) embedBuilder.WithThumbnail(guild.GetIconUrl(ImageFormat.Png));
string iconUrl = guild.GetIconUrl(ImageFormat.Png);
embedBuilder.WithFooter(guild.Name, iconUrl: iconUrl);
if (addThumbnail) embedBuilder.WithThumbnail(iconUrl);
return embedBuilder;
}
}

0 comments on commit c9155a4

Please sign in to comment.