mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
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>
This commit is contained in:
30
packages/discord.js/typings/index.d.ts
vendored
30
packages/discord.js/typings/index.d.ts
vendored
@@ -2192,27 +2192,27 @@ export class Message<InGuild extends boolean = boolean> extends Base {
|
|||||||
public createMessageComponentCollector<ComponentType extends MessageComponentType>(
|
public createMessageComponentCollector<ComponentType extends MessageComponentType>(
|
||||||
options?: MessageCollectorOptionsParams<ComponentType, InGuild>,
|
options?: MessageCollectorOptionsParams<ComponentType, InGuild>,
|
||||||
): InteractionCollector<MappedInteractionTypes<InGuild>[ComponentType]>;
|
): InteractionCollector<MappedInteractionTypes<InGuild>[ComponentType]>;
|
||||||
public delete(): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
public delete(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public edit(
|
public edit(
|
||||||
content: string | MessageEditOptions | MessagePayload,
|
content: string | MessageEditOptions | MessagePayload,
|
||||||
): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public equals(message: Message, rawData: unknown): boolean;
|
public equals(message: Message, rawData: unknown): boolean;
|
||||||
public fetchReference(): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
public fetchReference(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public fetchWebhook(): Promise<Webhook>;
|
public fetchWebhook(): Promise<Webhook>;
|
||||||
public crosspost(): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
public crosspost(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public fetch(force?: boolean): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
public fetch(force?: boolean): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public pin(reason?: string): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
public pin(reason?: string): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public react(emoji: EmojiIdentifierResolvable): Promise<MessageReaction>;
|
public react(emoji: EmojiIdentifierResolvable): Promise<MessageReaction>;
|
||||||
public removeAttachments(): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
public removeAttachments(): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public reply(
|
public reply(
|
||||||
options: string | MessagePayload | MessageReplyOptions,
|
options: string | MessagePayload | MessageReplyOptions,
|
||||||
): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public resolveComponent(customId: string): MessageActionRowComponent | null;
|
public resolveComponent(customId: string): MessageActionRowComponent | null;
|
||||||
public startThread(options: StartThreadOptions): Promise<PublicThreadChannel<false>>;
|
public startThread(options: StartThreadOptions): Promise<PublicThreadChannel<false>>;
|
||||||
public suppressEmbeds(suppress?: boolean): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
public suppressEmbeds(suppress?: boolean): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public toJSON(): unknown;
|
public toJSON(): unknown;
|
||||||
public toString(): string;
|
public toString(): string;
|
||||||
public unpin(reason?: string): Promise<NonPartialGroupDMChannel<Message<InGuild>>>;
|
public unpin(reason?: string): Promise<OmitPartialGroupDMChannel<Message<InGuild>>>;
|
||||||
public inGuild(): this is Message<true>;
|
public inGuild(): this is Message<true>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5270,7 +5270,7 @@ export interface GuildMembersChunk {
|
|||||||
nonce: string | undefined;
|
nonce: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
type NonPartialGroupDMChannel<Structure extends { channel: Channel }> = Structure & {
|
export type OmitPartialGroupDMChannel<Structure extends { channel: Channel }> = Structure & {
|
||||||
channel: Exclude<Structure['channel'], PartialGroupDMChannel>;
|
channel: Exclude<Structure['channel'], PartialGroupDMChannel>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5316,17 +5316,17 @@ export interface ClientEvents {
|
|||||||
guildUpdate: [oldGuild: Guild, newGuild: Guild];
|
guildUpdate: [oldGuild: Guild, newGuild: Guild];
|
||||||
inviteCreate: [invite: Invite];
|
inviteCreate: [invite: Invite];
|
||||||
inviteDelete: [invite: Invite];
|
inviteDelete: [invite: Invite];
|
||||||
messageCreate: [message: NonPartialGroupDMChannel<Message>];
|
messageCreate: [message: OmitPartialGroupDMChannel<Message>];
|
||||||
messageDelete: [message: NonPartialGroupDMChannel<Message | PartialMessage>];
|
messageDelete: [message: OmitPartialGroupDMChannel<Message | PartialMessage>];
|
||||||
messagePollVoteAdd: [pollAnswer: PollAnswer, userId: Snowflake];
|
messagePollVoteAdd: [pollAnswer: PollAnswer, userId: Snowflake];
|
||||||
messagePollVoteRemove: [pollAnswer: PollAnswer, userId: Snowflake];
|
messagePollVoteRemove: [pollAnswer: PollAnswer, userId: Snowflake];
|
||||||
messageReactionRemoveAll: [
|
messageReactionRemoveAll: [
|
||||||
message: NonPartialGroupDMChannel<Message | PartialMessage>,
|
message: OmitPartialGroupDMChannel<Message | PartialMessage>,
|
||||||
reactions: ReadonlyCollection<string | Snowflake, MessageReaction>,
|
reactions: ReadonlyCollection<string | Snowflake, MessageReaction>,
|
||||||
];
|
];
|
||||||
messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
|
messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
|
||||||
messageDeleteBulk: [
|
messageDeleteBulk: [
|
||||||
messages: ReadonlyCollection<Snowflake, NonPartialGroupDMChannel<Message | PartialMessage>>,
|
messages: ReadonlyCollection<Snowflake, OmitPartialGroupDMChannel<Message | PartialMessage>>,
|
||||||
channel: GuildTextBasedChannel,
|
channel: GuildTextBasedChannel,
|
||||||
];
|
];
|
||||||
messageReactionAdd: [
|
messageReactionAdd: [
|
||||||
|
|||||||
Reference in New Issue
Block a user