Fixed websocket message mention detection
This commit is contained in:
@@ -62,6 +62,9 @@ namespace Discord
|
||||
internal static ImmutableArray<TRole> GetRoleMentions<TRole>(string text, IGuild guild)
|
||||
where TRole : class, IRole
|
||||
{
|
||||
if (guild == null)
|
||||
return ImmutableArray.Create<TRole>();
|
||||
|
||||
var matches = _roleRegex.Matches(text);
|
||||
var builder = ImmutableArray.CreateBuilder<TRole>(matches.Count);
|
||||
foreach (var match in matches.OfType<Match>())
|
||||
|
||||
Reference in New Issue
Block a user