From 60c0a88e20cf65d514677e5470cfbfa943a61876 Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Sat, 28 Dec 2024 16:23:31 -0700 Subject: [PATCH] Include top of the stacktrace in error embed for emblem command This is the only place that the exception is directly logged to clients with the intent for them to open an issue on GitHub, so may as well give them more information to submit. --- Felicity/DiscordCommands/Interactions/EmblemCommands.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Felicity/DiscordCommands/Interactions/EmblemCommands.cs b/Felicity/DiscordCommands/Interactions/EmblemCommands.cs index 302330d..fadf8b4 100644 --- a/Felicity/DiscordCommands/Interactions/EmblemCommands.cs +++ b/Felicity/DiscordCommands/Interactions/EmblemCommands.cs @@ -297,6 +297,9 @@ where EmblemCats.EmblemCatList.Contains((EmblemCat)definitionParentNode.Hash!) { var errorEmbed = Embeds.MakeErrorEmbed(); errorEmbed.Description = error.Message; + if (error.StackTrace != null) { + errorEmbed.Description += "\n" + error.StackTrace.Split(Environment.NewLine).FirstOrDefault(); + } await FollowupAsync(embed: errorEmbed.Build()); return; }