import { AnyInteraction, getInteractionResponders, Nullable, PossiblePromise } from "@elara-services/utils"; import { InteractionCollector, type Interaction, type Message, type User } from "discord.js"; import type { AddPageData, CachedInt, PageData } from "./interfaces"; import { interact } from "./utils"; export type Interact = ReturnType; export type ErrorHandler = (...args: unknown[]) => unknown; export declare class Pager { #private; m: Message; i: CachedInt | Interaction; int: Interact; user?: User; errorHandler: ErrorHandler; time: number; pages: PageData[]; constructor(m: Message, i: CachedInt | Interaction, errorHandler?: ErrorHandler); setErrorHandler(set?: ErrorHandler): this; setLast(id?: string): this; setUser(user: User): this; setTime(ms: number): this; add(data: AddPageData[] | AddPageData): this; remove(id: string): this; getPageButtons(disabled?: Partial<{ back: boolean; forward: boolean; selector: boolean; }>): { type: number; components: { custom_id: string; label: string; type: number; style: 1 | 2 | 3 | 4 | 5; disabled: boolean; emoji: { name?: string | null | undefined; id?: string | null | undefined; animated?: boolean | undefined; } | undefined; url: string | undefined; }[]; }; set(id: string, reply?: boolean, int?: Interact, disabled?: boolean, interaction?: AnyInteraction): Promise; /** * For the custom run function, for the collector.stop reason set it to "custom" if you don't want it to edit the original message */ run(user?: User, run?: (message: Nullable, i: AnyInteraction, r: getInteractionResponders, collector: InteractionCollector) => PossiblePromise): Promise; }