diff --git a/src/managers/ThreadManager.js b/src/managers/ThreadManager.js index 67a4b0a8d7f6..300041d0868e 100644 --- a/src/managers/ThreadManager.js +++ b/src/managers/ThreadManager.js @@ -97,7 +97,14 @@ class ThreadManager extends CachedManager { * .then(threadChannel => console.log(threadChannel)) * .catch(console.error); */ - async create({ name, autoArchiveDuration, startMessage, type, invitable, reason } = {}) { + async create({ + name, + autoArchiveDuration = this.channel.defaultAutoArchiveDuration, + startMessage, + type, + invitable, + reason, + } = {}) { let path = this.client.api.channels(this.channel.id); if (type && typeof type !== 'string' && typeof type !== 'number') { throw new TypeError('INVALID_TYPE', 'type', 'ThreadChannelType or Number'); diff --git a/src/structures/Message.js b/src/structures/Message.js index e47d94480291..7d53e259ec20 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -791,8 +791,8 @@ class Message extends Base { * Options for starting a thread on a message. * @typedef {Object} StartThreadOptions * @property {string} name The name of the new thread - * @property {ThreadAutoArchiveDuration} [autoArchiveDuration] The amount of time (in minutes) after which the thread - * should automatically archive in case of no recent activity + * @property {ThreadAutoArchiveDuration} [autoArchiveDuration=this.channel.defaultAutoArchiveDuration] The amount of + * time (in minutes) after which the thread should automatically archive in case of no recent activity * @property {string} [reason] Reason for creating the thread */