Slightly faster startup and database access. Shard 0 will now report total guild count

This commit is contained in:
Master Kwoth
2017-06-22 23:59:54 +02:00
parent bed3001ce1
commit 741538a982
14 changed files with 252 additions and 241 deletions

View File

@@ -6,7 +6,7 @@
//using System;
//using System.Linq;
//using System.Threading.Tasks;
////todo Rewrite
//namespace NadekoBot.Modules.Utility
//{
// public partial class Utility

View File

@@ -319,11 +319,7 @@ namespace NadekoBot.Modules.Utility
[NadekoCommand, Usage, Description, Aliases]
public async Task Stats()
{
//var shardId = Context.Guild != null
// ? _client.GetShardIdFor(Context.Guild)
// : 0;
{
await Context.Channel.EmbedAsync(
new EmbedBuilder().WithOkColor()
.WithAuthor(eab => eab.WithName($"NadekoBot v{StatsService.BotVersion}")
@@ -339,13 +335,7 @@ namespace NadekoBot.Modules.Utility
.AddField(efb => efb.WithName(GetText("uptime")).WithValue(_stats.GetUptimeString("\n")).WithIsInline(true))
.AddField(efb => efb.WithName(GetText("presence")).WithValue(
GetText("presence_txt",
_client.Guilds.Count, _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true))
#if !GLOBAL_NADEKO
//.WithFooter(efb => efb.WithText(GetText("stats_songs",
// _music.MusicPlayers.Count(mp => mp.Value.CurrentSong != null),
// _music.MusicPlayers.Sum(mp => mp.Value.Playlist.Count))))
#endif
);
_stats.GuildCount, _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true)));
}
[NadekoCommand, Usage, Description, Aliases]