mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Possible fix for #322
This commit is contained in:
@@ -4,7 +4,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AngleSharp.Common;
|
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Net;
|
using Discord.Net;
|
||||||
using LinqToDB;
|
using LinqToDB;
|
||||||
@@ -13,7 +12,6 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using NadekoBot.Common.ModuleBehaviors;
|
using NadekoBot.Common.ModuleBehaviors;
|
||||||
using NadekoBot.Extensions;
|
using NadekoBot.Extensions;
|
||||||
using NadekoBot.Services;
|
using NadekoBot.Services;
|
||||||
using NadekoBot.Services.Database;
|
|
||||||
|
|
||||||
namespace NadekoBot.Modules.Searches
|
namespace NadekoBot.Modules.Searches
|
||||||
{
|
{
|
||||||
|
@@ -108,7 +108,11 @@ namespace NadekoBot.Modules.Utility
|
|||||||
await ctx.Channel.TriggerTypingAsync().ConfigureAwait(false);
|
await ctx.Channel.TriggerTypingAsync().ConfigureAwait(false);
|
||||||
await _tracker.EnsureUsersDownloadedAsync(ctx.Guild).ConfigureAwait(false);
|
await _tracker.EnsureUsersDownloadedAsync(ctx.Guild).ConfigureAwait(false);
|
||||||
|
|
||||||
var users = await ctx.Guild.GetUsersAsync();
|
var users = await ctx.Guild.GetUsersAsync(
|
||||||
|
#if GLOBAL_NADEKO
|
||||||
|
CacheMode.CacheOnly
|
||||||
|
#endif
|
||||||
|
);
|
||||||
var roleUsers = users
|
var roleUsers = users
|
||||||
.Where(u => role is null ? u.RoleIds.Count == 1 : u.RoleIds.Contains(role.Id))
|
.Where(u => role is null ? u.RoleIds.Count == 1 : u.RoleIds.Contains(role.Id))
|
||||||
.Select(u => $"`{u.Id, 18}` {u}")
|
.Select(u => $"`{u.Id, 18}` {u}")
|
||||||
|
Reference in New Issue
Block a user