import { DMChannel, GroupDMChannel, Message, MessageOptions, TextChannel } from 'discord.js'; export declare type TextBasedChannel = TextChannel | DMChannel | GroupDMChannel; export declare type SentResponse = Message | Message[]; export interface IResponseOptions extends MessageOptions { /** * Whether to catch all rejections when sending. The promise will always resolve when this option * is enabled; if there is an error, the resolution will be undefined. */ catchall?: boolean; /** * Whether to send a new message regardless of any prior responses. */ force?: boolean; } export declare type Send = (data: string | IResponseOptions, options?: IResponseOptions) => Promise; /** * Send responses to a message. */ export default class Response { /** * The message to respond to. */ message: Message; /** * Whether to edit previous responses. */ edit: boolean; /** * The channel to send responses in. */ channel: TextBasedChannel; /** * The message to edit, if enabled. */ responseMessage?: Message | null; /** * The queue of response jobs. */ private readonly _q; /** * @param message The message to respond to. * @param edit Whether to edit previous responses. */ constructor(message: Message, edit?: boolean); /** * Send a message using the Discord.js `Message.send` method. If a prior * response has been sent, it will edit that unless the `force` parameter * is set. Automatically attempts to fallback to DM responses. You can * send responses without waiting for prior responses to succeed. * @param data The data to send * @param options Message options. * @param messageOptions Discord.js message options. */ send: Send; error: Send; success: Send; dm: Send; }