From aff772c7aa3b3de58780a94588d1f3576a434f32 Mon Sep 17 00:00:00 2001 From: Qjuh <76154676+Qjuh@users.noreply.github.com> Date: Thu, 5 Sep 2024 00:16:54 +0200 Subject: [PATCH] types: export GroupDM helper type (#10478) * types: export GroupDM helper type * refactor: rename type --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- 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 1dc3d97ea94a..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; } -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: [