public async Task DeleteConfirmation(string isPublic, string userID) { ModCaseRepository repo = ModCaseRepository.CreateDefault(ServiceProvider, CurrentIdentity); List <ModCase> modCases = await repo.GetCasesForGuildAndUser(Context.Guild.Id, Convert.ToUInt64(userID)); modCases = modCases.Where(x => x.PunishmentActive && x.PunishmentType == PunishmentType.Mute).ToList(); foreach (ModCase modCase in modCases) { await repo.DeleteModCase(modCase.GuildId, modCase.CaseId, false, true, isPublic == "1"); } var castInteraction = Context.Interaction as SocketMessageComponent; var embed = castInteraction.Message.Embeds.FirstOrDefault().ToEmbedBuilder() .WithColor(new Color(Convert.ToUInt32(int.Parse("7289da", NumberStyles.HexNumber)))); // discord blurple embed.Fields = new() { new EmbedFieldBuilder().WithName(Translator.T().CmdUndoResultTitle()).WithValue(Translator.T().CmdUndoUnmuteResultDeleted()) }; await castInteraction.UpdateAsync(message => { message.Embed = embed.Build(); message.Components = new ComponentBuilder().Build(); }); }