From 70a2d94c8329a6cc0283f2c8099aa94adea4c42d Mon Sep 17 00:00:00 2001 From: RedGuy12 <61329810+RedGuy12@users.noreply.github.com> Date: Sat, 27 Aug 2022 17:17:00 -0500 Subject: [PATCH] types(ThreadChannel): `fetchStarterMessage` must return a `Message` Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com> --- packages/discord.js/src/structures/ThreadChannel.js | 2 +- packages/discord.js/typings/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js index 14cbe6b84dd9..00ef1ad3e6e6 100644 --- a/packages/discord.js/src/structures/ThreadChannel.js +++ b/packages/discord.js/src/structures/ThreadChannel.js @@ -283,7 +283,7 @@ class ThreadChannel extends BaseChannel { * This only works when the thread started from a message in the parent channel, otherwise the promise will * reject. If you just need the id of that message, use {@link ThreadChannel#id} instead. * @param {BaseFetchOptions} [options] Additional options for this fetch - * @returns {Promise} + * @returns {Promise|null>} */ // eslint-disable-next-line require-await async fetchStarterMessage(options) { diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 351a33220bcd..5762aeaca6f1 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2551,7 +2551,7 @@ export class ThreadChannel extends TextBasedChannelMixin(BaseChannel, true, [ checkAdmin?: boolean, ): Readonly | null; public fetchOwner(options?: BaseFetchOptions): Promise; - public fetchStarterMessage(options?: BaseFetchOptions): Promise; + public fetchStarterMessage(options?: BaseFetchOptions): Promise | null>; public setArchived(archived?: boolean, reason?: string): Promise; public setAutoArchiveDuration( autoArchiveDuration: ThreadAutoArchiveDuration,