import type { AdaptorModalActionRowComponent } from "./component"; import type { AdaptorMessagePayload } from "./messagePayload"; import type { SetNullable } from "../../util/types"; /** * @see https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object */ export type AdaptorInteractionResponse = AdaptorInteractionResponseReply | AdaptorInteractionResponseDeferredReply | AdaptorInteractionResponseDeferredUpdate | AdaptorInteractionResponseModal; export declare const AdaptorInteractionResponseTypeMap: { readonly channelMessageWithSource: 4; readonly deferredChannelMessageWithSource: 5; readonly deferredUpdateMessage: 6; readonly modal: 9; }; /** * Messageとして返信する */ export interface AdaptorInteractionResponseReply { /** * @see AdaptorInteractionResponseTypeMap */ type: "channelMessageWithSource"; data: AdaptorMessagePayload & { ephemeral?: boolean; }; } /** * 回答保留する * ユーザ側には返答待ち状態である旨が表示される */ export interface AdaptorInteractionResponseDeferredReply { /** * @see AdaptorInteractionResponseTypeMap */ type: "deferredChannelMessageWithSource"; data?: { suppressEmbeds?: boolean; ephemeral?: boolean; }; } /** * 回答保留する * ユーザ側には返答待ち状態である旨が表示されない * MessageComponentによるInteractionにのみ使用できる */ export interface AdaptorInteractionResponseDeferredUpdate { /** * @see AdaptorInteractionResponseTypeMap */ type: "deferredUpdateMessage"; } /** * Modalを開く */ export interface AdaptorInteractionResponseModal { /** * @see AdaptorInteractionResponseTypeMap */ type: "modal"; data: AdaptorInteractionResponseModalData; } export interface AdaptorInteractionResponseModalData { /** * a developer-defined identifier for the component, max 100 characters */ customId: string; /** * the title of the popup modal, max 45 characters */ title: string; /** * between 1 and 5 (inclusive) components that make up the modal */ components: [AdaptorModalActionRowComponent] | [AdaptorModalActionRowComponent, AdaptorModalActionRowComponent] | [ AdaptorModalActionRowComponent, AdaptorModalActionRowComponent, AdaptorModalActionRowComponent ] | [ AdaptorModalActionRowComponent, AdaptorModalActionRowComponent, AdaptorModalActionRowComponent, AdaptorModalActionRowComponent ] | [ AdaptorModalActionRowComponent, AdaptorModalActionRowComponent, AdaptorModalActionRowComponent, AdaptorModalActionRowComponent, AdaptorModalActionRowComponent ]; } /** * @see https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response */ export type AdaptorInteractionResponsePatch = Omit>, "messageReference" | "stickerIds">; //# sourceMappingURL=interactionResponse.d.ts.map