Fixes RoleTypeReader (#631)

This commit is contained in:
Confruggy
2017-04-28 16:49:50 +02:00
committed by RogueException
parent ba1a9aaa18
commit 4ca273dd4a

View File

@@ -31,7 +31,7 @@ namespace Discord.Commands
AddResult(results, role as T, role.Name == input ? 0.80f : 0.70f);
if (results.Count > 0)
return Task.FromResult(TypeReaderResult.FromSuccess(results.Values));
return Task.FromResult(TypeReaderResult.FromSuccess(results.Values.ToReadOnlyCollection()));
}
return Task.FromResult(TypeReaderResult.FromError(CommandError.ObjectNotFound, "Role not found."));
}