static void Main(string[] args) { Console.WriteLine("Starting program"); var cs = SettingsAccessor.GetSetting <string>("DBConnectionString"); var botAPIKey = SettingsAccessor.GetSetting <string>("SlackBotAPIKey"); InitializeDatabase(); bot.Aliases = new List <string>() { "beef" }; bot.Responders.Add(new AddBeefResponder()); bot.Responders.Add(new CurrentBeefsResponder()); bot.Responders.Add(new BeefEventsTime()); bot.Responders.Add(new BeefEventsForResponder()); bot.Responders.Add(new BeefDetailsResponder()); bot.Responders.Add(new BeefCloseIndividual()); bot.Responders.Add(new BeefCloseAllForUserResponder()); bot.Responders.Add(new HelpResponder()); Console.WriteLine("Starting slack connection"); var botConnection = bot.Connect(botAPIKey); bot.ConnectionStatusChanged += Bot_ConnectionStatusChanged; Console.CancelKeyPress += delegate { bot.Disconnect(); Console.WriteLine("Got signal to shut down."); exitMre.Set(); }; exitMre.WaitOne(); }