/** Per-element ceilings the Discord API enforces. Degradation is truncate/clamp — never silent drop. */ export declare const DISCORD_LIMITS: { readonly componentsPerMessage: 40; readonly actionRows: 5; readonly buttonsPerRow: 5; readonly selectOptions: 25; readonly selectPlaceholder: 150; readonly textDisplayChars: 2000; readonly totalTextChars: 4000; readonly buttonLabel: 80; readonly customId: 100; readonly headerText: 256; }; /** Truncate to max chars, appending an ellipsis marker if the input was longer. Never returns >max. */ export declare function truncateText(text: string, max: number): string; /** Clamp an array to max items; return the kept items plus how many overflowed (for an overflow signal). */ export declare function clampArray(items: readonly T[], max: number): { items: T[]; overflow: number; }; /** * Truncate text that may contain ``` code fences, then re-balance: if truncation * left an odd number of fence delimiters (i.e. a fence was cut open), append a * closing fence. The result never exceeds `max` — the closing fence is added by * trimming further if needed so the total stays within budget. */ export declare function truncateFenced(text: string, max: number): string; //# sourceMappingURL=budget.d.ts.map