private async Task MainAsync(string[] args) { Console.CancelKeyPress += this.ShutdownHandler; this.bot = new Logic.TipBot(); await this.bot.StartAsync(args); await Task.Delay(-1); }
public Worker(IOptionsMonitor <TipBotSettings> options, Logic.TipBot bot) { this.settings = options.CurrentValue; this.bot = bot; // Make sure it is possible to edit the API keys while running. options.OnChange(config => { this.settings = config; }); }