diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js index 074ff052ac59..e19455aa91bd 100644 --- a/packages/discord.js/src/structures/ThreadChannel.js +++ b/packages/discord.js/src/structures/ThreadChannel.js @@ -288,10 +288,16 @@ 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 + * @param {FetchThreadOwnerOptions} [options] Options for fetching the owner * @returns {Promise} */ async fetchOwner(options) { diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 537b04ac6131..3742b55f65ff 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3377,7 +3377,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; @@ -5854,6 +5854,10 @@ export interface FetchThreadMemberOptions extends BaseFetchOptions { withMember?: boolean; } +export interface FetchThreadOwnerOptions extends BaseFetchOptions { + withMember?: boolean; +} + export interface FetchThreadMembersWithGuildMemberDataOptions { withMember: true; after?: Snowflake;