Browse Source

Add Channel.IsPrivate comment to Message.Member error

tags/docs-0.9
RogueException 9 years ago
parent
commit
d27e74a9ae
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net/Models/Message.cs

+ 2
- 2
src/Discord.Net/Models/Message.cs View File

@@ -157,10 +157,10 @@ namespace Discord
{
get
{
if (ServerId != null)
if (!Channel.IsPrivate)
return _client.Members[UserId, ServerId];
else
throw new InvalidOperationException("Unable to access Member in a private channel. Use User instead.");
throw new InvalidOperationException("Unable to access Member in a private channel. Use User instead or check for Channel.IsPrivate.");
}
}



Loading…
Cancel
Save