From 44bea813c193444587426c916a8988e335f4bdbc Mon Sep 17 00:00:00 2001 From: Qjuh <76154676+Qjuh@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:45:37 +0200 Subject: [PATCH 1/2] types: export GroupDM helper type --- packages/discord.js/typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 1dc3d97ea94a..685d15c8e70a 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -5270,7 +5270,7 @@ export interface GuildMembersChunk { nonce: string | undefined; } -type NonPartialGroupDMChannel = Structure & { +export type NonPartialGroupDMChannel = Structure & { channel: Exclude; }; From 0d8f7d58fe7db9bd343cd4b64c1461d3d013737f Mon Sep 17 00:00:00 2001 From: Qjuh <76154676+Qjuh@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:22:02 +0200 Subject: [PATCH 2/2] refactor: rename type --- packages/discord.js/typings/index.d.ts | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 685d15c8e70a..a0c3b64900b1 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2192,27 +2192,27 @@ export class Message extends Base { public createMessageComponentCollector( options?: MessageCollectorOptionsParams, ): InteractionCollector[ComponentType]>; - public delete(): Promise>>; + public delete(): Promise>>; public edit( content: string | MessageEditOptions | MessagePayload, - ): Promise>>; + ): Promise>>; public equals(message: Message, rawData: unknown): boolean; - public fetchReference(): Promise>>; + public fetchReference(): Promise>>; public fetchWebhook(): Promise; - public crosspost(): Promise>>; - public fetch(force?: boolean): Promise>>; - public pin(reason?: string): Promise>>; + public crosspost(): Promise>>; + public fetch(force?: boolean): Promise>>; + public pin(reason?: string): Promise>>; public react(emoji: EmojiIdentifierResolvable): Promise; - public removeAttachments(): Promise>>; + public removeAttachments(): Promise>>; public reply( options: string | MessagePayload | MessageReplyOptions, - ): Promise>>; + ): Promise>>; public resolveComponent(customId: string): MessageActionRowComponent | null; public startThread(options: StartThreadOptions): Promise>; - public suppressEmbeds(suppress?: boolean): Promise>>; + public suppressEmbeds(suppress?: boolean): Promise>>; public toJSON(): unknown; public toString(): string; - public unpin(reason?: string): Promise>>; + public unpin(reason?: string): Promise>>; public inGuild(): this is Message; } @@ -5270,7 +5270,7 @@ export interface GuildMembersChunk { nonce: string | undefined; } -export type NonPartialGroupDMChannel = Structure & { +export type OmitPartialGroupDMChannel = Structure & { channel: Exclude; }; @@ -5316,17 +5316,17 @@ export interface ClientEvents { guildUpdate: [oldGuild: Guild, newGuild: Guild]; inviteCreate: [invite: Invite]; inviteDelete: [invite: Invite]; - messageCreate: [message: NonPartialGroupDMChannel]; - messageDelete: [message: NonPartialGroupDMChannel]; + messageCreate: [message: OmitPartialGroupDMChannel]; + messageDelete: [message: OmitPartialGroupDMChannel]; messagePollVoteAdd: [pollAnswer: PollAnswer, userId: Snowflake]; messagePollVoteRemove: [pollAnswer: PollAnswer, userId: Snowflake]; messageReactionRemoveAll: [ - message: NonPartialGroupDMChannel, + message: OmitPartialGroupDMChannel, reactions: ReadonlyCollection, ]; messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction]; messageDeleteBulk: [ - messages: ReadonlyCollection>, + messages: ReadonlyCollection>, channel: GuildTextBasedChannel, ]; messageReactionAdd: [