Add documentation link to template get command

This commit is contained in:
Toastie 2025-02-04 20:12:37 +13:00
parent 1a79ae1d23
commit 2242e6e3bf
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7

View file

@ -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);
}