import { BusinessCallbackQuery, CallbackQuery, ChosenInlineResult, InlineCallbackQuery, InlineQuery, BusinessMessage, Message } from '@mtcute/core'; import { UpdateContextDistributed } from '../context/base.js'; import { UpdateFilter } from './types.js'; type UpdatesWithText = Message | BusinessMessage | UpdateContextDistributed; /** * Filter objects that match a given regular expression * - for `Message`, `Message.text` is used * - for `InlineQuery`, `InlineQuery.query` is used * - for {@link ChosenInlineResult}, {@link ChosenInlineResult#id} is used * - for callback queries, `dataStr` is used * * When a regex matches, the match array is stored in a * type-safe extension field `.match` of the object * * @param regex Regex to be matched */ export declare function regex(regex: RegExp): UpdateFilter; /** * Filter objects which contain the exact text given * - for `Message`, `Message.text` is used * - for `InlineQuery`, `InlineQuery.query` is used * - for {@link ChosenInlineResult}, {@link ChosenInlineResult.id} is used * - for callback queries, `dataStr` is used * * @param str String to be matched * @param ignoreCase Whether string case should be ignored */ export declare function equals(str: string, ignoreCase?: boolean): UpdateFilter; /** * Filter objects which contain the text given (as a substring) * - for `Message`, `Message.text` is used * - for `InlineQuery`, `InlineQuery.query` is used * - for {@link ChosenInlineResult}, {@link ChosenInlineResult.id} is used * - for callback queries, `dataStr` is used * * @param str Substring to be matched * @param ignoreCase Whether string case should be ignored */ export declare function contains(str: string, ignoreCase?: boolean): UpdateFilter; /** * Filter objects which contain the text starting with a given string * - for `Message`, `Message.text` is used * - for `InlineQuery`, `InlineQuery.query` is used * - for {@link ChosenInlineResult}, {@link ChosenInlineResult.id} is used * - for callback queries, `dataStr` is used * * @param str Substring to be matched * @param ignoreCase Whether string case should be ignored */ export declare function startsWith(str: string, ignoreCase?: boolean): UpdateFilter; /** * Filter objects which contain the text ending with a given string * - for `Message`, `Message.text` is used * - for `InlineQuery`, `InlineQuery.query` is used * - for {@link ChosenInlineResult}, {@link ChosenInlineResult.id} is used * - for callback queries, `dataStr` is used * * @param str Substring to be matched * @param ignoreCase Whether string case should be ignored */ export declare function endsWith(str: string, ignoreCase?: boolean): UpdateFilter; export {};