From 23e6414420dccc9d3a87e13d691aaa390eceaa34 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Apr 2019 11:32:03 +0100 Subject: [PATCH] fix: old objects not being cached (#3225) please post issues if you find any, will probably cause some --- src/stores/DataStore.js | 2 +- test/voice.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/DataStore.js b/src/stores/DataStore.js index ade8c70f7..be1e93d79 100644 --- a/src/stores/DataStore.js +++ b/src/stores/DataStore.js @@ -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; diff --git a/test/voice.js b/test/voice.js index 6d022a29c..e8613a58a 100644 --- a/test/voice.js +++ b/test/voice.js @@ -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');