Skip to content

Commit 837ccc4

Browse files
buildbuild
authored andcommitted
additional debug
1 parent 3332048 commit 837ccc4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

BaroBot/Services/SteamLinkService.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ private async Task OnCategoryCreated(CategoryCreatedEvent ev)
119119
return;
120120

121121
var guild = _discord.GetGuild(ev.Category.GuildId);
122+
await guild.DownloadUsersAsync();
122123
foreach (var user in guild.Users)
123124
{
124125
try
@@ -130,7 +131,11 @@ private async Task OnCategoryCreated(CategoryCreatedEvent ev)
130131

131132
Log.Info(user.DisplayName);
132133
List<int>? ownedGames = await GetOwnedGamesAsync(steamLink.SteamId, _environmentConfig.SteamApiKey!);
133-
if (ownedGames is not null && ownedGames.Contains(ev.Category.GameId))
134+
if (ownedGames is null)
135+
continue;
136+
137+
Log.Info(string.Join(", ", ownedGames));
138+
if (ownedGames.Contains(ev.Category.GameId))
134139
{
135140
await user.AddRoleAsync(ev.Category.RoleId);
136141
Log.Info(1);

0 commit comments

Comments
 (0)