fix: Issues related to absence of bot scope (#2352)

This commit is contained in:
d4n
2022-08-03 04:17:43 -05:00
committed by GitHub
parent c49d4830af
commit 1eb42c6128
16 changed files with 49 additions and 45 deletions

View File

@@ -127,7 +127,7 @@ namespace Discord.WebSocket
refMsgAuthor = guild.GetUser(refMsg.Author.Value.Id);
}
else
refMsgAuthor = (Channel as SocketChannel).GetUser(refMsg.Author.Value.Id);
refMsgAuthor = (Channel as SocketChannel)?.GetUser(refMsg.Author.Value.Id);
if (refMsgAuthor == null)
refMsgAuthor = SocketUnknownUser.Create(Discord, state, refMsg.Author.Value);
}