diff --git a/packages/discord.js/src/structures/interfaces/Collector.js b/packages/discord.js/src/structures/interfaces/Collector.js index a5fde7db4..f3b1f3855 100644 --- a/packages/discord.js/src/structures/interfaces/Collector.js +++ b/packages/discord.js/src/structures/interfaces/Collector.js @@ -272,14 +272,22 @@ class Collector extends AsyncEventEmitter { * @param {CollectorResetTimerOptions} [options] Options for resetting */ resetTimer({ time, idle } = {}) { + if (time) { + this.options.time = time; + } + + if (idle) { + this.options.idle = idle; + } + if (this._timeout) { clearTimeout(this._timeout); - this._timeout = setTimeout(() => this.stop('time'), time ?? this.options.time).unref(); + this._timeout = setTimeout(() => this.stop('time'), this.options.time).unref(); } if (this._idletimeout) { clearTimeout(this._idletimeout); - this._idletimeout = setTimeout(() => this.stop('idle'), idle ?? this.options.idle).unref(); + this._idletimeout = setTimeout(() => this.stop('idle'), this.options.idle).unref(); } }