public async Task Connect() { string slackKey = _configReader.SlackApiKey(); var connector = new SlackConnector.SlackConnector(); _connection = await connector.Connect(slackKey); _connection.OnMessageReceived += MessageReceived; _connection.OnDisconnect += OnDisconnect; _log.Info("Connected!"); _log.Info($"Bots Name: {_connection.Self.Name}"); _log.Info($"Team Name: {_connection.Team.Name}"); _container.GetPlugin <StatsPlugin>()?.RecordStat("Connected:Since", DateTime.Now.ToString("G")); _container.GetPlugin <StatsPlugin>()?.RecordStat("Response:Average", _averageResponse); StartPlugins(); }