using HermesSocketServer.Models; using ILogger = Serilog.ILogger; namespace HermesSocketServer.Requests { public class DeleteTTSFilter : IRequest { public string Name => "delete_tts_filter"; public string[] RequiredKeys => ["id"]; private ILogger _logger; public DeleteTTSFilter(ILogger logger) { _logger = logger; } public Task Grant(Channel channel, IDictionary data) { string filterId = data["id"].ToString()!; channel.Filters.Remove(filterId); _logger.Information($"Deleted a TTS filter by id [tts filter id: {filterId}]"); return Task.FromResult(RequestResult.Successful(null)); } } }