Skip to content

Commit

Permalink
fix(Sweepers): add sweepStickers function (#7213)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koyamie authored Jan 8, 2022
1 parent 137ea24 commit 95f8375
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/discord.js/src/util/Sweepers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <info>It is highly recommended to keep the client thread member cached</info>
Expand Down

0 comments on commit 95f8375

Please sign in to comment.