mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
refactor(Managers): rename add to _add (#6060)
This commit is contained in:
@@ -27,8 +27,8 @@ class GuildBanManager extends CachedManager {
|
||||
* @name GuildBanManager#cache
|
||||
*/
|
||||
|
||||
add(data, cache) {
|
||||
return super.add(data, cache, { id: data.user.id, extras: [this.guild] });
|
||||
_add(data, cache) {
|
||||
return super._add(data, cache, { id: data.user.id, extras: [this.guild] });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,12 +110,12 @@ class GuildBanManager extends CachedManager {
|
||||
}
|
||||
|
||||
const data = await this.client.api.guilds(this.guild.id).bans(user).get();
|
||||
return this.add(data, cache);
|
||||
return this._add(data, cache);
|
||||
}
|
||||
|
||||
async _fetchMany(cache) {
|
||||
const data = await this.client.api.guilds(this.guild.id).bans.get();
|
||||
return data.reduce((col, ban) => col.set(ban.user.id, this.add(ban, cache)), new Collection());
|
||||
return data.reduce((col, ban) => col.set(ban.user.id, this._add(ban, cache)), new Collection());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user