internal async Task <IReadOnlyCollection <Models.Group> > GetBannedGroupsAsync(AbstractSubredditOptionSet options) { if (UserLookup is CacheableBackedBotDatabase cacheable) { if (cacheable.IsStale) { IncrementStatisticIfExists("requestRate"); } } IReadOnlyCollection <String> actioned = options.ActionedUserTypes.ToHashSet(); return(actioned.Count == 0 ? await UserLookup.GetDefaultBannedGroupsAsync() : (await UserLookup.GetAllGroupsAsync()).Values.Where(group => actioned.Contains(group.Name)).ToArray()); }