Example #1
0
        public MehService(DiscordSocketClient client, LocalStorage localStorage, MehApi api, IOptions <MehSettings> settings)
        {
            _client       = client;
            _localStorage = localStorage;
            _mehApi       = api;
            _settings     = settings.Value;

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

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

            _logger.Info($"{channelIds?.Count ?? 0} channel ids loaded for MehService");
        }
Example #2
0
 public MehApi(IOptions <MehSettings> settings)
 {
     _settings = settings.Value;
 }