Failed to call hook 'OnPlayerReported' - InvalidEmbedException: Embed Fields cannot have a null or empty valueFixed

Seen this a couple of times now, I assume it's when they hit F7 but just don't fill any fields out?

Failed to call hook 'OnPlayerReported' on plugin 'Rustcord v3.2.3' (InvalidEmbedException: Embed Fields cannot have a null or empty value)
at Oxide.Ext.Discord.Builders.DiscordEmbedBuilder.AddField (System.String name, System.String value, System.Boolean inline) [0x00078] in <85dc8dcaf65b4f96a2f6c61b75dcaaab>:0
at Oxide.Plugins.Rustcord.OnPlayerReported (BasePlayer reporter, System.String targetName, System.String targetId, System.String subject, System.String message, System.String type) [0x000aa] in <8b7f054e623e4c48ab539496d6443069>:0
at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00f0d] in <8b7f054e623e4c48ab539496d6443069>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <50629aa0e75d4126b345d8d9d64da28d>:0

Will look into it.

ikWpEctKOZnWUTF.jpg OuTSMoKE

Will look into it.

change the embed builder for on player reported since not all player reports are players on that server

      if (_settings.OutputFormat.OutputTypeF7Report == "Embed")
            {
                DiscordEmbedBuilder builder = new DiscordEmbedBuilder()
                                              .AddTitle("PLAYER F7 REPORT")
                                              .AddThumbnail("https://i.imgur.com/qg7v0Tv.png")
                                              .AddField("Reporter", reporter.displayName, false)
                                              .AddField("User Reported", $"{targetName} ([{targetId}](https://steamcommunity.com/profiles/{targetId})", false)
                                              .AddField("Reason", subject, false)
                                              .AddFooter("Rustcord 3.2.3")
                                              .AddNowTimestamp()
                                              .AddField("Message", message, false);

Just a heads up I just got another of these (I'm on the latest version):

Failed to call hook 'OnPlayerReported' on plugin 'Rustcord v3.2.4' (InvalidEmbedException: Embed Fields cannot have a null or empty value)
at Oxide.Ext.Discord.Builders.DiscordEmbedBuilder.AddField (System.String name, System.String value, System.Boolean inline) [0x00078] in <85dc8dcaf65b4f96a2f6c61b75dcaaab>:0
at Oxide.Plugins.Rustcord.OnPlayerReported (BasePlayer reporter, System.String targetName, System.String targetId, System.String subject, System.String message, System.String type) [0x000e8] in <fcbfa7ce17f34a8e98c2487f6b871d4b>:0
at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00f0d] in <fcbfa7ce17f34a8e98c2487f6b871d4b>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <e23ba2c0f246426296d81c842cbda3af>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <50629aa0e75d4126b345d8d9d64da28d>:0​
TjTsrtDe5ANx1SV.jpg Whispers88

change the embed builder for on player reported since not all player reports are players on that server

      if (_settings.OutputFormat.OutputTypeF7Report == "Embed")
            {
                DiscordEmbedBuilder builder = new DiscordEmbedBuilder()
                                              .AddTitle("PLAYER F7 REPORT")
                                              .AddThumbnail("https://i.imgur.com/qg7v0Tv.png")
                                              .AddField("Reporter", reporter.displayName, false)
                                              .AddField("User Reported", $"{targetName} ([{targetId}](https://steamcommunity.com/profiles/{targetId})", false)
                                              .AddField("Reason", subject, false)
                                              .AddFooter("Rustcord 3.2.3")
                                              .AddNowTimestamp()
                                              .AddField("Message", message, false);

I missed this, thanks lol

Thanks guys

Locked automatically