fix: old objects not being cached (#3225)

please post issues if you find any, will probably cause some
This commit is contained in:
Amish Shah
2019-04-23 11:32:03 +01:00
parent c4b79571ba
commit 23e6414420
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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');