fix(fetchMemberList) throw error wrong

This commit is contained in:
March 7th 2022-09-22 17:35:50 +07:00
parent 419a695389
commit 2eff5e7d9b

View File

@ -572,6 +572,7 @@ class GuildMemberManager extends CachedManager {
timeout.refresh(); timeout.refresh();
if (guild.id !== this.guild.id) return; if (guild.id !== this.guild.id) return;
if (type == 'INVALIDATE' && offset > 100) { if (type == 'INVALIDATE' && offset > 100) {
clearTimeout(timeout);
this.client.removeListener(Events.GUILD_MEMBER_LIST_UPDATE, handler); this.client.removeListener(Events.GUILD_MEMBER_LIST_UPDATE, handler);
this.client.decrementMaxListeners(); this.client.decrementMaxListeners();
reject(new Error('INVALIDATE_MEMBER', raw.ops[0].range)); reject(new Error('INVALIDATE_MEMBER', raw.ops[0].range));