Don't crash if Mention.Resolve is passed a private message.
This commit is contained in:
@@ -72,7 +72,7 @@ namespace Discord
|
||||
if (source == null) throw new ArgumentNullException(nameof(source));
|
||||
if (text == null) throw new ArgumentNullException(nameof(text));
|
||||
|
||||
return Resolve(source.Server, text);
|
||||
return Resolve(source?.Server, text);
|
||||
}
|
||||
|
||||
/// <summary>Resolves all mentions in a provided string to those users, channels or roles' names.</summary>
|
||||
|
||||
Reference in New Issue
Block a user