public async Task UpdateOverviewsAsync() { var updateChannels = await _configDataAccess.GetConfigAsync("tempusOverviewChannel"); if (updateChannels == null || updateChannels.Count == 0) { return; } foreach (var updateChannel in updateChannels) { await UpdateChannelOverviewAsync(updateChannel.Value); } }
private async Task ReadyAsync() { var channelStrings = await _configDataAccess.GetConfigAsync("logChannel"); var channels = new List <ITextChannel>(); foreach (var channelString in channelStrings) { if (!ulong.TryParse(channelString.Value, out var channelParsed)) { continue; } if (_client.GetChannel(channelParsed) is ITextChannel channel) { channels.Add(channel); } } Logger.StartLoggingToChannel(_client, channels); Logger.LogInfo("Lambda", $"Time elapsed since startup {(DateTime.Now - _startDateTime).TotalMilliseconds}ms"); await _client.SetGameAsync("!help"); // Runs once on startup, make sure it runs when connected _intervalFunctionTimer = new Timer(IntervalFunctionsAsync, null, 0, FromMinutes(5)); }
public async Task UpdateServersAsync() { var updateChannels = await _configDataAccess.GetConfigAsync("justjumpUpdateChannel"); if (updateChannels == null || updateChannels.Count == 0) { return; } foreach (var updateChannel in updateChannels) { await UpdateChannelAsync(updateChannel.Value); } }
public async Task UpdateDataAsync() { var updateChannels = await _configDataAccess.GetConfigAsync("simplyRankUpdateChannel"); if (updateChannels == null || updateChannels.Count == 0) { return; } foreach (var channel in updateChannels) { UpdateChannelAsync(channel.Value); } }