import { type Chat, type Context, type Filter } from "@yaebal/core"; /** * command filters. same routing rules as `composer.command()` — fresh messages * only (an edited `/cmd` doesn't re-fire), message *text* only (a caption is * not a command), `@mention` checked against `ctx.me` when known, names * matched case-insensitively — plus multiple names, custom prefixes and * regex names on top. */ export interface CommandOptions { /** accepted command prefixes (default `"/"`). */ prefixes?: string | readonly string[]; /** match string names exactly instead of case-insensitively. */ caseSensitive?: boolean; } /** what a matched `command()` stages: the name, whitespace-split args, and the raw trimmed remainder. */ export type CommandAdd = { command: string; args: string[]; payload: string; }; /** any `/command`. */ export declare function command(): Filter; /** a `/command` with one of the given names. */ export declare function command(name: string | readonly string[], options?: CommandOptions): Filter; /** a `/command` whose name fully matches `re`; also stages `ctx.match` (with the groups). */ export declare function command(name: RegExp, options?: CommandOptions): Filter; /** `/start` in a private chat. */ export declare const start: Filter; /** `/start` in a group (a `?startgroup` deep link landed). */ export declare const startGroup: Filter; type StartAdd = CommandAdd & { chat: Chat & { type: "private"; }; }; /** `/start` with the exact deep-link payload (`t.me/bot?start=`). */ export declare function deeplink(param: string): Filter; /** `/start` whose deep-link payload matches `re`; also stages `ctx.match` (with the groups). */ export declare function deeplink(param: RegExp): Filter; export {}; //# sourceMappingURL=command.d.ts.map