mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
refactor(Managers): rename add to _add (#6060)
This commit is contained in:
@@ -15,7 +15,7 @@ class CachedManager extends DataManager {
|
||||
|
||||
if (iterable) {
|
||||
for (const item of iterable) {
|
||||
this.add(item);
|
||||
this._add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ class CachedManager extends DataManager {
|
||||
return this._cache;
|
||||
}
|
||||
|
||||
add(data, cache = true, { id, extras = [] } = {}) {
|
||||
_add(data, cache = true, { id, extras = [] } = {}) {
|
||||
const existing = this.cache.get(id ?? data.id);
|
||||
if (cache) existing?._patch(data);
|
||||
if (existing) return existing;
|
||||
|
||||
Reference in New Issue
Block a user