import { Client } from "./Client"; import { InteractionOptions } from "./InteractionOptions"; import { Message } from "./Message"; import { User } from "./User"; import { MessageActionRow, MessageComponentData } from "./classes/MessageActionRow"; import { MessageAttachment } from "./classes/MessageAttachment"; import { MessageEmbed, MessageEmbedData } from "./classes/MessageEmbed"; import { TextInput } from "./classes/Modal"; import { FastifyReply } from "fastify"; import { TextChannel } from "./TextChannel"; import { Http } from "./Http"; export declare class Interaction extends Http { data: InteractionData; res: FastifyReply; message: Message; options: InteractionOptions; client: Client; user: User; channel: TextChannel; deffered: boolean; createdTimestamp: number; replied: boolean; values?: string[]; url: string; constructor(interactionData: InteractionData, res: FastifyReply, client: Client); get guild(): string; get commandName(): string; get customId(): string; set commandName(name: string); set customId(id: string); isCommand(): this is Interaction; isButton(): boolean; isModalSubmit(): boolean; isSelectMenu(): boolean; showModal(data: TextInput): Promise; reply(data: InteractionReplyData): Promise; replyAutocomplete(data: InteractionReplyData): Promise; editReply(data: InteractionReplyData): Promise; deleteReply(): Promise; update(data: InteractionReplyData): Promise; followUp(data: InteractionReplyData): Promise; defer(): Promise; deferUpdate(): Promise; sleep(ms: number): Promise; static parseMessage(msg: InteractionReplyData): InteractionReplyFormatted; private avatarURL; static parseEmbed(embed: MessageEmbed): MessageEmbedData; } export interface InteractionData { id: string; type?: number; application_id: string; guild_id?: string; channel_id?: string; locale: string; options?: InteractionAutocompleteOption[]; data: { guild_id: string; name: string; id: string; options?: InteractionOption[]; type: number; component_type?: number; custom_id?: string; }; default_member_permissions?: string[]; dm_permission?: boolean; default_permission?: boolean; version: string; token: string; member: { avatar: string; deaf: boolean; flags: number; is_pending: boolean; joined_at: string; mute: boolean; nick: string; pending: boolean; permissions: string; roles: string[]; user: { avatar: string; discriminator: string; id: string; public_flags: number; username: string; tag: string; }; }; components?: { type: number; custom_id: string; style: number; label: string; emoji: { id: string; name: string; animated: boolean; }; url: string; disabled: boolean; components?: { type: number; custom_id: string; value: string; style: number; label: string; emoji: { id: string; name: string; animated: boolean; }; url: string; disabled: boolean; }[]; }[]; } declare interface InteractionOption { type: number; name: string; description: string; required: boolean; choices: InteractionOptionChoice[]; options: InteractionOption[]; channel_types: number[]; min_value?: number; max_value?: number; min_length?: number; autocomplete?: boolean; focused?: boolean; value?: string; } declare interface InteractionAutocompleteOption { focused: boolean; name: string; type: number; value: string; } declare interface InteractionOptionChoice { name: string; value: string | number; } export interface InteractionReplyData { ephemeral?: boolean; flags?: number; content?: string; embeds?: MessageEmbed[]; components?: MessageActionRow[]; files?: MessageAttachment[]; attachments?: MessageAttachment[]; } declare interface InteractionReplyFormatted { ephemeral?: boolean; flags?: number; content?: string; embeds?: MessageEmbedData[]; components?: MessageComponentData[]; attachments?: any[]; } export {};