private static async Task <int> Main(string[] args) { var config = new ConfigurationBuilder() .AddJsonFile("settings.json", false, true) .AddJsonFile("settings.dev.json", true, true) .AddEnvironmentVariables("SHUSH_") .Build(); var settings = new SlackBotSettings(); config.Bind(settings); try { var bot = new SlackBot(settings); await bot.Run(); } catch (ShushBotException botException) { Console.WriteLine(botException.Message); return(1); } return(0); }
/// <summary> /// Creates a new slack bot based on supplied settings. Does not connect to slack yet. /// </summary> public SlackBot(SlackBotSettings settings) { this.settings = settings; }