From b01ffa816124301bb0869348c030433589e5941f Mon Sep 17 00:00:00 2001 From: spiral Date: Sat, 10 Dec 2022 16:51:33 +0000 Subject: [PATCH] fix(bot): hopefully fix NRE in reaction listener --- PluralKit.Bot/Handlers/ReactionAdded.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Bot/Handlers/ReactionAdded.cs b/PluralKit.Bot/Handlers/ReactionAdded.cs index 0331e218..145f241c 100644 --- a/PluralKit.Bot/Handlers/ReactionAdded.cs +++ b/PluralKit.Bot/Handlers/ReactionAdded.cs @@ -60,7 +60,7 @@ public class ReactionAdded: IEventHandler // Ignore reactions from bots (we can't DM them anyway) // note: this used to get from cache since this event does not contain Member in DMs // but we aren't able to get DMs from bots anyway, so it's not really needed - if (evt.GuildId != null && evt.Member.User.Bot) return; + if (evt.GuildId != null && (evt.Member?.User?.Bot ?? false)) return; var channel = await _cache.GetChannel(evt.ChannelId);