Fix error in stats collection task

This commit is contained in:
Ske 2020-04-29 00:04:53 +02:00
parent 66dd850504
commit 35e30f481b

View File

@ -72,7 +72,9 @@ namespace PluralKit.Bot
foreach (var user in guild.Members.Values) foreach (var user in guild.Members.Values)
{ {
usersKnown.Add(user.Id); usersKnown.Add(user.Id);
if (user.Presence.Status == UserStatus.Online) usersOnline.Add(user.Id);
// Presence updates are disabled, for now we just assume every user is online, I guess
usersOnline.Add(user.Id);
} }
_metrics.Measure.Gauge.SetValue(BotMetrics.MembersTotal, usersKnown.Count); _metrics.Measure.Gauge.SetValue(BotMetrics.MembersTotal, usersKnown.Count);