mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Removed unneeded httpclient for searchimages and some minor cleanup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#nullable disable
|
||||
#nullable disable
|
||||
using Humanizer.Localisation;
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
using System.Diagnostics;
|
||||
@@ -133,11 +133,16 @@ public class StatsService : IStatsService, IReadyExecutor, INService, IDisposabl
|
||||
};
|
||||
}
|
||||
|
||||
public async Task OnReadyAsync()
|
||||
private void InitializeChannelCount()
|
||||
{
|
||||
var guilds = _client.Guilds;
|
||||
textChannels = guilds.Sum(g => g.Channels.Count(cx => cx is ITextChannel));
|
||||
voiceChannels = guilds.Sum(g => g.Channels.Count(cx => cx is IVoiceChannel));
|
||||
textChannels = guilds.Sum(static g => g.Channels.Count(static cx => cx is ITextChannel));
|
||||
voiceChannels = guilds.Sum(static g => g.Channels.Count(static cx => cx is IVoiceChannel));
|
||||
}
|
||||
|
||||
public async Task OnReadyAsync()
|
||||
{
|
||||
InitializeChannelCount();
|
||||
|
||||
using var timer = new PeriodicTimer(TimeSpan.FromHours(1));
|
||||
do
|
||||
|
Reference in New Issue
Block a user