From ee1698d92869280dcfdbfb353712ef97dff90b56 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Wed, 2 Mar 2022 09:29:59 +0000 Subject: [PATCH] feat: Backport `sweepStickers` method (#7558) --- src/util/Sweepers.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/util/Sweepers.js b/src/util/Sweepers.js index ab91bf958833..a826115a3900 100644 --- a/src/util/Sweepers.js +++ b/src/util/Sweepers.js @@ -192,6 +192,15 @@ class Sweepers { return this._sweepGuildDirectProp('stageInstances', filter, { outputName: 'stage instances' }).items; } + /** + * Sweeps all guild stickers and removes the ones which are indicated by the filter. + * @param {Function} filter The function used to determine which stickers will be removed from the caches. + * @returns {number} Amount of stickers that were removed from the caches + */ + sweepStickers(filter) { + return this._sweepGuildDirectProp('stickers', filter).items; + } + /** * Sweeps all thread members and removes the ones which are indicated by the filter. * It is highly recommended to keep the client thread member cached