Skip to content

Commit

Permalink
maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
SylveonDeko committed Sep 30, 2024
1 parent 185cf21 commit 3f5cc52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mewdeko/Controllers/BotStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public class BotStatus(DiscordShardedClient client, StatsService statsService, C
[HttpGet]
public async Task<IActionResult> GetStatus()
{
var clients = client.Shards;
var rest = client.Rest;
var curUser = await rest.GetUserAsync(client.CurrentUser.Id);
var guilds = await rest.GetGuildsAsync();
var toReturn = new BotStatusModel
{
BotName = client.CurrentUser.GlobalName ?? client.CurrentUser.Username,
Expand All @@ -38,7 +38,7 @@ public async Task<IActionResult> GetStatus()
ModulesCount = commandService.Modules.Count(x => !x.IsSubmodule),
DNetVersion = statsService.Library,
BotStatus = client.Status.ToString(),
UserCount = client.Guilds.Select(x => x.Users.Count).Sum(),
UserCount = clients.Select(x => x.Guilds.Sum(g => g.Users.Count)).Sum(),
CommitHash = GetCommitHash(),
BotId = client.CurrentUser.Id
};
Expand Down

0 comments on commit 3f5cc52

Please sign in to comment.