diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js index 129fa3ae3..d3b92dd80 100644 --- a/packages/discord.js/src/structures/ThreadChannel.js +++ b/packages/discord.js/src/structures/ThreadChannel.js @@ -287,11 +287,17 @@ class ThreadChannel extends BaseChannel { return this.parent?.permissionsFor(memberOrRole, checkAdmin) ?? null; } + /** + * Options used to fetch a thread owner. + * @typedef {BaseFetchOptions} FetchThreadOwnerOptions + * @property {boolean} [withMember] Whether to also return the guild member associated with this thread member + */ + /** * Fetches the owner of this thread. If the thread member object isn't needed, * use {@link ThreadChannel#ownerId} instead. - * @param {BaseFetchOptions} [options] The options for fetching the member - * @returns {Promise} + * @param {FetchThreadOwnerOptions} [options] Options for fetching the owner + * @returns {Promise} */ async fetchOwner(options) { if (!this.ownerId) { diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 0661f25ea..afb73b20a 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3318,7 +3318,7 @@ export class ThreadChannel extends BaseCha memberOrRole: GuildMemberResolvable | RoleResolvable, checkAdmin?: boolean, ): Readonly | null; - public fetchOwner(options?: BaseFetchOptions): Promise; + public fetchOwner(options?: FetchThreadOwnerOptions): Promise; public fetchStarterMessage(options?: BaseFetchOptions): Promise | null>; public setArchived(archived?: boolean, reason?: string): Promise; public setAutoArchiveDuration(autoArchiveDuration: ThreadAutoArchiveDuration, reason?: string): Promise; @@ -5565,6 +5565,10 @@ export interface FetchThreadMemberOptions extends BaseFetchOptions { withMember?: boolean; } +export interface FetchThreadOwnerOptions extends BaseFetchOptions { + withMember?: boolean; +} + export interface FetchThreadMembersWithGuildMemberDataOptions { withMember: true; after?: Snowflake;