mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
feat(Interactions): option to auto-fetch replies (#5831)
This commit is contained in:
24
typings/index.d.ts
vendored
24
typings/index.d.ts
vendored
@@ -558,11 +558,14 @@ declare module 'discord.js' {
|
||||
public options: Collection<string, CommandInteractionOption>;
|
||||
public replied: boolean;
|
||||
public webhook: InteractionWebhook;
|
||||
public defer(options?: InteractionDeferOptions & { fetchReply: true }): Promise<Message | RawMessage>;
|
||||
public defer(options?: InteractionDeferOptions): Promise<void>;
|
||||
public deleteReply(): Promise<void>;
|
||||
public editReply(options: string | MessagePayload | WebhookEditMessageOptions): Promise<Message | APIMessage>;
|
||||
public fetchReply(): Promise<Message | APIMessage>;
|
||||
public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message | APIMessage>;
|
||||
public reply(
|
||||
options: string | MessagePayload | (InteractionReplyOptions & { fetchReply: true }),
|
||||
): Promise<Message | APIMessage>;
|
||||
public reply(options: string | MessagePayload | InteractionReplyOptions): Promise<void>;
|
||||
private transformOption(option: unknown, resolved: unknown): CommandInteractionOption;
|
||||
private _createOptionsCollection(options: unknown, resolved: unknown): Collection<string, CommandInteractionOption>;
|
||||
@@ -1417,14 +1420,23 @@ declare module 'discord.js' {
|
||||
public message: Message | APIMessage;
|
||||
public replied: boolean;
|
||||
public webhook: InteractionWebhook;
|
||||
public defer(options?: InteractionDeferOptions & { fetchReply: true }): Promise<Message | RawMessage>;
|
||||
public defer(options?: InteractionDeferOptions): Promise<void>;
|
||||
public deferUpdate(): Promise<void>;
|
||||
public deferUpdate(options?: InteractionDeferUpdateOptions & { fetchReply: true }): Promise<Message | RawMessage>;
|
||||
public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<void>;
|
||||
public deleteReply(): Promise<void>;
|
||||
public editReply(options: string | MessagePayload | WebhookEditMessageOptions): Promise<Message | APIMessage>;
|
||||
public fetchReply(): Promise<Message | APIMessage>;
|
||||
public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message | APIMessage>;
|
||||
public reply(
|
||||
options: string | MessagePayload | (InteractionReplyOptions & { fetchReply: true }),
|
||||
): Promise<Message | APIMessage>;
|
||||
public reply(options: string | MessagePayload | InteractionReplyOptions): Promise<void>;
|
||||
public update(content: string | MessagePayload | WebhookEditMessageOptions): Promise<void>;
|
||||
public update(
|
||||
content: string | MessagePayload | (InteractionUpdateOptions & { fetchReply: true }),
|
||||
): Promise<Message | APIMessage>;
|
||||
public update(content: string | MessagePayload | InteractionUpdateOptions): Promise<void>;
|
||||
|
||||
public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType;
|
||||
}
|
||||
|
||||
@@ -3609,16 +3621,22 @@ declare module 'discord.js' {
|
||||
|
||||
interface InteractionDeferOptions {
|
||||
ephemeral?: boolean;
|
||||
fetchReply?: boolean;
|
||||
}
|
||||
|
||||
interface InteractionDeferUpdateOptions extends Omit<InteractionDeferOptions, 'ephemeral'> {}
|
||||
|
||||
interface InteractionReplyOptions extends Omit<WebhookMessageOptions, 'username' | 'avatarURL'> {
|
||||
ephemeral?: boolean;
|
||||
fetchReply?: boolean;
|
||||
}
|
||||
|
||||
type InteractionResponseType = keyof typeof InteractionResponseTypes;
|
||||
|
||||
type InteractionType = keyof typeof InteractionTypes;
|
||||
|
||||
interface InteractionUpdateOptions extends Omit<InteractionReplyOptions, 'ephemeral'> {}
|
||||
|
||||
type IntentsString =
|
||||
| 'GUILDS'
|
||||
| 'GUILD_MEMBERS'
|
||||
|
||||
Reference in New Issue
Block a user