Fixed a nullref in streamrole service

This commit is contained in:
Kwoth
2022-12-23 17:04:08 +01:00
parent 76b7e09905
commit 01da7e813e

View File

@@ -39,7 +39,8 @@ public class StreamRoleService : IReadyExecutor, INService
if (oldPresence.Activities.Count != newPresence.Activities.Count)
{
var guildUsers = _client.Guilds
.Select(x => x.GetUser(user.Id));
.Select(x => x.GetUser(user.Id))
.Where(x => x is not null);
foreach (var guildUser in guildUsers)
{