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