import { Channel } from "../objects/Channel"; import { DefaultEmoji } from "../objects/DefaultEmoji"; import { Emoji } from "../objects/Emoji"; import { User } from "../objects/User"; export declare enum AutocompleteType { CHANNEL = 0, EMOJI = 1, USER = 2 } export interface AutocompleteTabResult { text: string; newCursor: number; } export interface AutocompleteItem { type: AutocompleteType; delimiter: string; result: string; } type AllType = AutocompleteResult["channels"][0] | AutocompleteResult["emojis"][0] | AutocompleteResult["users"][0]; export interface AutocompleteResult { channels: Channel[]; emojis: (DefaultEmoji | Emoji)[]; users: User[]; size: number; all: AllType[]; tab(item: AllType): AutocompleteTabResult; } export declare const AutocompleteItems: AutocompleteItem[]; /** * Calculates autocomplete for the given input text in the given channel. * * @param channel The channel to use for calculation of channel/user mentions. * @param text The text to calculate against. * @param cursorPos The position of the cursor in the text. * @param unique If `emojis` is set, uses emoji's `uniqueName` instead of ID for autocomplete. If `users` is set, uses user's username for autocomplete. (pairs nicely with Channel.send expandMentions/expandEmojis) * @returns An AutocompleteResult with matched items. */ export declare function parseAutocomplete(channel: Channel, text: string, cursorPos: number, unique?: { emojis?: boolean; users?: boolean; }): AutocompleteResult | null; export {};