mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(sweepers): provide default for object param (#7182)
This commit is contained in:
@@ -375,11 +375,11 @@ class Sweepers {
|
|||||||
* Sweep a direct sub property of all guilds
|
* Sweep a direct sub property of all guilds
|
||||||
* @param {string} key The name of the property
|
* @param {string} key The name of the property
|
||||||
* @param {Function} filter Filter function passed to sweep
|
* @param {Function} filter Filter function passed to sweep
|
||||||
* @param {SweepEventOptions} [eventOptions] Options for the Client event emitted here
|
* @param {SweepEventOptions} [eventOptions={}] Options for the Client event emitted here
|
||||||
* @returns {Object} Object containing the number of guilds swept and the number of items swept
|
* @returns {Object} Object containing the number of guilds swept and the number of items swept
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_sweepGuildDirectProp(key, filter, { emit = true, outputName }) {
|
_sweepGuildDirectProp(key, filter, { emit = true, outputName } = {}) {
|
||||||
if (typeof filter !== 'function') {
|
if (typeof filter !== 'function') {
|
||||||
throw new TypeError('INVALID_TYPE', 'filter', 'function');
|
throw new TypeError('INVALID_TYPE', 'filter', 'function');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user