Skip to content

Commit

Permalink
Perform cleanup on AddGuildInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbooth committed Mar 6, 2022
1 parent 520033c commit b1577ac
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Hammer/Extensions/DiscordEmbedExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DisCatSharp;
using DisCatSharp;
using DisCatSharp.Entities;

namespace Hammer.Extensions;
Expand Down Expand Up @@ -63,17 +63,13 @@ public static DiscordEmbedBuilder AddField(this DiscordEmbedBuilder embedBuilder
/// <param name="addThumbnail">
/// <see langword="true" /> to include the guild icon as a thumbnail; otherwise, <see langword="false" />.
/// </param>
/// <returns>The <see cref="DiscordEmbedBuilder" /> with the footer and thumbnail assigned the guild's branding.</returns>
/// <returns><paramref name="embedBuilder" />, to allow for method chaining.</returns>
public static DiscordEmbedBuilder AddGuildInfo(this DiscordEmbedBuilder embedBuilder, DiscordGuild guild,
bool addThumbnail = true)
{
embedBuilder.WithFooter(guild.Name, iconUrl: guild.IconUrl);

if (addThumbnail)
{
embedBuilder.WithThumbnail(guild.IconUrl);
}
embedBuilder.WithFooter(guild.Name, guild.IconUrl);

if (addThumbnail) embedBuilder.WithThumbnail(guild.IconUrl);
return embedBuilder;
}
}

0 comments on commit b1577ac

Please sign in to comment.