import { type Context, type Filter, type Message, type MessageEntity } from "@yaebal/core"; /** * message-shape filters: media, replies, forwards, entities, service events. * they check the update's own message (`messageOf`), and most are pure * narrowers — they stage nothing and only refine `ctx.message` so the matched * field is non-optional for the handler. */ /** narrows `ctx.message` so the given fields are present. a union of keys means "any of them". */ export type MessageWith = { message: Message & (K extends unknown ? { [P in K]-?: NonNullable; } : never); }; /** every media payload a message can carry — checked against the generated `Message` type. */ declare const MEDIA_KINDS: readonly ["animation", "audio", "document", "live_photo", "paid_media", "photo", "sticker", "story", "video", "video_note", "voice"]; export type MediaKind = (typeof MEDIA_KINDS)[number]; /** message carries one of the given media kinds; narrows `ctx.message`. */ export declare function mediaType(...kinds: readonly K[]): Filter>; /** message carries any media. */ export declare const media: Filter; export declare const photo: Filter>; export declare const video: Filter>; export declare const audio: Filter>; export declare const voice: Filter>; export declare const sticker: Filter>; export declare const document: Filter>; export declare const animation: Filter>; export declare const videoNote: Filter>; export declare const paidMedia: Filter>; export declare const story: Filter>; /** message contains a static location. */ export declare const location: Filter>; /** message contains a contact. */ export declare const contact: Filter>; /** message contains a venue. */ export declare const venue: Filter>; /** message contains a poll (the `poll` *update* is a different thing — use `on("poll")`). */ export declare const poll: Filter>; /** message contains a dice roll. */ export declare const dice: Filter>; /** message contains a game. */ export declare const game: Filter>; /** message contains an invoice. */ export declare const invoice: Filter>; /** message is a successful-payment service message. */ export declare const successfulPayment: Filter>; /** message is a reply to another message. */ export declare const reply: Filter>; /** message is forwarded from somewhere. */ export declare const forward: Filter>; /** where a forwarded message came from (the generated schema keeps `origin.type` a plain string). */ export type ForwardOriginType = "user" | "hidden_user" | "chat" | "channel"; /** message is forwarded from one of the given origin kinds (any, when none given). */ export declare function forwardOrigin(...types: readonly ForwardOriginType[]): Filter>; /** message was sent via an inline bot — any, or one of the given ids/`@usernames`. */ export declare function viaBot(...ids: (number | string)[]): Filter>; /** * message contains an entity of the given type — in text *or* caption * (`#hashtag` on a photo counts). stages the matching entities as * `ctx.entities`; with no `type`, any entity matches and all are staged. */ export declare function hasEntity(type?: MessageEntity["type"]): Filter; /** message is a service message (member joined/left, pin, topic event, video chat, …). */ export declare const service: Filter; /** users joined the chat. */ export declare const newChatMembers: Filter>; /** a user left the chat. */ export declare const leftChatMember: Filter>; /** a message was pinned. */ export declare const pinnedMessage: Filter>; export {}; //# sourceMappingURL=message.d.ts.map