mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 18:20:11 +00:00
Ignore reactions on channels we don't have cached
This commit is contained in:
parent
c7612df37e
commit
20addea986
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ namespace PluralKit.Bot
|
||||||
private async ValueTask TryHandleProxyMessageReactions(MessageReactionAddEventArgs evt)
|
private async ValueTask TryHandleProxyMessageReactions(MessageReactionAddEventArgs evt)
|
||||||
{
|
{
|
||||||
// Only proxies in guild text channels
|
// Only proxies in guild text channels
|
||||||
if (evt.Channel.Type != ChannelType.Text) return;
|
if (evt.Channel == null || evt.Channel.Type != ChannelType.Text) return;
|
||||||
|
|
||||||
// Sometimes we get events from users that aren't in the user cache
|
// Sometimes we get events from users that aren't in the user cache
|
||||||
// In that case we get a "broken" user object (where eg. calling IsBot throws an exception)
|
// In that case we get a "broken" user object (where eg. calling IsBot throws an exception)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue