mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: old objects not being cached (#3225)
please post issues if you find any, will probably cause some
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user