mirror of
https://github.com/danbulant/discord.js
synced 2026-06-18 14:11:09 +00:00
fix: old objects not being cached (#3225)
please post issues if you find any, will probably cause some
This commit is contained in:
parent
c4b79571ba
commit
23e6414420
2 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ class DataStore extends Collection {
|
|||
|
||||
add(data, cache = true, { id, extras = [] } = {}) {
|
||||
const existing = this.get(id || data.id);
|
||||
if (existing && existing.partial && cache && existing._patch) existing._patch(data);
|
||||
if (existing && existing._patch && cache) existing._patch(data);
|
||||
if (existing) return existing;
|
||||
|
||||
const entry = this.holds ? new this.holds(this.client, data, ...extras) : data;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const ytdl = require('ytdl-core');
|
|||
const prism = require('prism-media');
|
||||
const fs = require('fs');
|
||||
|
||||
const client = new Discord.Client({ fetchAllMembers: false, partials: true, apiRequestMethod: 'sequential' });
|
||||
const client = new Discord.Client({ fetchAllMembers: false, partials: [], apiRequestMethod: 'sequential' });
|
||||
|
||||
const auth = require('./auth.js');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue