diff --git a/PluralKit.Bot/Commands/Groups.cs b/PluralKit.Bot/Commands/Groups.cs index 75d94ad5..e1c5986a 100644 --- a/PluralKit.Bot/Commands/Groups.cs +++ b/PluralKit.Bot/Commands/Groups.cs @@ -385,22 +385,29 @@ public class Groups { ctx.CheckSystemPrivacy(target.System, target.BannerPrivacy); - if ((target.BannerImage?.Trim() ?? "").Length > 0) - { - var eb = new EmbedBuilder() - .Title("Group banner image") - .Image(new Embed.EmbedImage(target.BannerImage)); - - if (target.System == ctx.System?.Id) - eb.Description($"To clear, use `pk;group {target.Reference(ctx)} banner clear`."); - - await ctx.Reply(embed: eb.Build()); - } + if ((target.Icon?.Trim() ?? "").Length > 0) + switch (ctx.MatchFormat()) + { + case ReplyFormat.Raw: + await ctx.Reply($"`{target.BannerImage.TryGetCleanCdnUrl()}`"); + break; + case ReplyFormat.Plaintext: + var ebP = new EmbedBuilder() + .Description($"Showing banner for group {target.NameFor(ctx)}"); + await ctx.Reply(text: $"<{target.BannerImage.TryGetCleanCdnUrl()}>", embed: ebP.Build()); + break; + default: + var ebS = new EmbedBuilder() + .Title("Group banner image") + .Image(new Embed.EmbedImage(target.BannerImage.TryGetCleanCdnUrl())); + if (target.System == ctx.System?.Id) + ebS.Description($"To clear, use `pk;group {target.Reference(ctx)} banner clear`."); + await ctx.Reply(embed: ebS.Build()); + break; + } else - { throw new PKSyntaxError( - "This group does not have a banner image set. Set one by attaching an image to this command, or by passing an image URL."); - } + "This group does not have a banner image set. Set one by attaching an image to this command, or by passing an image URL or @mention."); } if (ctx.MatchClear())