import { FastifyReply } from "fastify"; import { Client, InteractionOptions, Message, MessageActionRow, MessageAttachment, MessageEmbed, User } from ".."; import { MessageEmbedData } from "../classes/MessageEmbed"; import { MessageComponentData } from "../classes/MessageActionRow"; import { Base, InteractionDataLike } from "./Base"; export declare class BaseInteraction extends Base { data: InteractionDataLike; res: FastifyReply; client: Client; readonly replied: boolean; readonly deffered: boolean; readonly createdTimestamp: number; options: InteractionOptions; user: User; constructor(data: InteractionDataLike, res: FastifyReply, client: Client); reply(data: InteractionReplyData): Promise; editReply(data: InteractionReplyData): Promise; deleteReply(): Promise; followUp(data: InteractionReplyData): Promise; deferUpdate(): Promise; static parseMessage(msg: InteractionReplyData): InteractionReplyFormatted; 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; }[]; }[]; } export 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 {};