From c16859036f6b7578be0b39437c788fc5dd636d11 Mon Sep 17 00:00:00 2001 From: Paulo Date: Wed, 26 May 2021 17:35:10 -0300 Subject: [PATCH] Move line back to where it was --- src/Discord.Net.WebSocket/DiscordSocketClient.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index 1353b583b..7a1aaa6d6 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -1234,7 +1234,7 @@ namespace Discord.WebSocket var data = (payload as JToken).ToObject(_serializer); var channel = State.GetChannel(data.ChannelId) as ISocketMessageChannel; - SocketUser author; + var guild = (channel as SocketGuildChannel)?.Guild; if (guild != null && !guild.IsSynced) { @@ -1255,6 +1255,7 @@ namespace Discord.WebSocket } } + SocketUser author; if (guild != null) { if (data.WebhookId.IsSpecified)