示例#1
0
        public SlackClient(SlackDto.Setting slack)
        {
            _botName = slack.BotName;
            _prefix  = slack.Prefix;

            _appClient = new HttpClient();

            _botClient = new HttpClient();

            _appClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", slack.AppToken);
            _botClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", slack.BotToken);

            Task.WaitAll(GetChannelList());
        }
示例#2
0
 public SLogger(SlackDto.Setting setting)
 {
     _setting     = setting;
     _slackClient = new SlackClient(_setting);
 }