public static async Task Main(string[] args) { ManualResetEvent endSignal = new ManualResetEvent(false); Console.CancelKeyPress += (sender, args) => endSignal.Set(); using IHost host = CreateHostBuilder(args).Build(); TtsBot bot = host.Services.GetService <TtsBot>(); await bot.StartAsync(); await host.StartAsync(); endSignal.WaitOne(); await host.StopAsync(); await bot.ShutdownAsync(); }
public Impl(ILogger <Impl> logger, TtsBot bot, DataStore dataStore) { _logger = logger; _bot = bot; _dataStore = dataStore; }