Exemplo n.º 1
0
        public ChronoGgService(DiscordSocketClient client, LocalStorage localStorage, ChronoGgApi chronoGgApi, IOptions <ChronoGgSettings> settings)
        {
            _client       = client;
            _localStorage = localStorage;
            _chronoGgApi  = chronoGgApi;
            _settings     = settings.Value;

            var channelIds = localStorage.ReadData <List <ulong> >(DataFileName).Result;

            if (channelIds != null && channelIds.Any())
            {
                foreach (ulong channelId in channelIds)
                {
                    AutoSaleChannels.TryAdd(channelId, true);
                }
            }

            _logger.Info("{0} channel ids loaded for ChronoGGService", channelIds?.Count ?? 0);
        }
Exemplo n.º 2
0
 public ChronoGgApi(IOptions <ChronoGgSettings> settings)
 {
     _settings = settings.Value;
 }