SupportChild/Commands/RestartInterviewCommand.cs

23 lines
734 B
C#
Raw Normal View History

2024-12-26 07:47:07 +00:00
using System.ComponentModel;
using System.Threading.Tasks;
using DSharpPlus.Commands;
using DSharpPlus.Commands.Processors.SlashCommands;
using DSharpPlus.Entities;
namespace SupportChild.Commands;
public class RestartInterviewCommand
{
[Command("restartinterview")]
[Description("Restarts the automated interview in this channel, using an updated template if available.")]
public async Task OnExecute(SlashCommandContext command)
{
await command.DeferResponseAsync();
await Interviewer.RestartInterview(command);
await command.RespondAsync(new DiscordEmbedBuilder
{
Color = DiscordColor.Green,
Description = "Interview restarted."
}, true);
}
}