diff --git a/src/structures/ThreadChannel.js b/src/structures/ThreadChannel.js index d642b9a..10afa20 100644 --- a/src/structures/ThreadChannel.js +++ b/src/structures/ThreadChannel.js @@ -283,10 +283,11 @@ class ThreadChannel extends Channel { * 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} */ - fetchStarterMessage(options) { - return this.parent.messages.fetch(this.id, options); + // eslint-disable-next-line require-await + async fetchStarterMessage(options) { + return this.parent?.messages.fetch(this.id, options) ?? null; } /** diff --git a/typings/index.d.ts b/typings/index.d.ts index ad7f0f1..1de5aae 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2852,7 +2852,7 @@ export class ThreadChannel extends TextBasedChannelMixin(Channel, ['fetchWebhook checkAdmin?: boolean, ): Readonly | null; public fetchOwner(options?: BaseFetchOptions): Promise; - public fetchStarterMessage(options?: BaseFetchOptions): Promise; + public fetchStarterMessage(options?: BaseFetchOptions): Promise; public setArchived(archived?: boolean, reason?: string): Promise; public setAutoArchiveDuration( autoArchiveDuration: ThreadAutoArchiveDuration | 'MAX',