From 2242e6e3bf0621ca309158d8e72e44092ac2fc25 Mon Sep 17 00:00:00 2001 From: Toastie <toastie@toastiet0ast.com> Date: Tue, 4 Feb 2025 20:12:37 +1300 Subject: [PATCH] Add documentation link to template get command --- Commands/InterviewTemplateCommands.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Commands/InterviewTemplateCommands.cs b/Commands/InterviewTemplateCommands.cs index 7b821e3..386e41b 100644 --- a/Commands/InterviewTemplateCommands.cs +++ b/Commands/InterviewTemplateCommands.cs @@ -42,7 +42,15 @@ public class InterviewTemplateCommands if (Database.TryGetInterviewTemplateJSON(category.Id, out string templateJSON)) { MemoryStream stream = new(Encoding.UTF8.GetBytes(templateJSON)); - await command.RespondAsync(new DiscordInteractionResponseBuilder().AddFile("interview-template-" + category.Id + ".json", stream).AsEphemeral()); + await command.RespondAsync(new DiscordInteractionResponseBuilder() + .AddEmbed(new DiscordEmbedBuilder + { + Color = DiscordColor.Green, + Description = "Upload the json file using the `/interviewtemplate set` command when you are done editing it.\n\n" + + "Click [here](https://toastielab.dev/toastie-stuff/SupportChild/src/branch/main/docs/InterviewTemplates.md) to learn how to edit interview templates." + }) + .AddFile("interview-template-" + category.Id + ".json", stream) + .AsEphemeral()); return; } @@ -69,7 +77,9 @@ public class InterviewTemplateCommands DiscordInteractionResponseBuilder response = new DiscordInteractionResponseBuilder().AddEmbed(new DiscordEmbedBuilder { Color = DiscordColor.Green, - Description = "No interview template found for this category. A default template has been generated." + Description = "No interview template found for this category. A default template has been generated.\n\n" + + "Upload the json file using the `/interviewtemplate set` command when you are done editing it.\n\n" + + "Click [here](https://toastielab.dev/toastie-stuff/SupportChild/src/branch/main/docs/InterviewTemplates.md) to learn how to edit interview templates." }).AddFile("interview-template-" + category.Id + ".json", defStream).AsEphemeral(); await command.RespondAsync(response); }