Browse Source

Add null-conditional to MessageManager

tags/1.0-rc
Christopher F 9 years ago
parent
commit
7473ed331d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net/Entities/WebSocket/MessageManager.cs

+ 1
- 1
src/Discord.Net/Entities/WebSocket/MessageManager.cs View File

@@ -61,7 +61,7 @@ namespace Discord
};
var downloadedMessages = await _discord.ApiClient.GetChannelMessagesAsync(_channel.Id, args).ConfigureAwait(false);

var guild = (_channel as ICachedGuildChannel).Guild;
var guild = (_channel as ICachedGuildChannel)?.Guild;
return cachedMessages.Concat(downloadedMessages.Select(x =>
{
IUser user = _channel.GetUser(x.Author.Value.Id, true);


Loading…
Cancel
Save