telebot-ts API Documentation - v1.0.0
    Preparing search index...

    Class RegexFilter

    Filter that matches message text or caption against a regular expression pattern.

    Populates context.matches when handled in a MessageHandler.

    const regexFilter = new RegexFilter(/^order_(\d+)$/i);
    

    Hierarchy (View Summary)

    Index
    pattern: RegExp

    The compiled regular expression pattern to match against.

    • Checks whether the message text or caption matches the pattern.

      Parameters

      • update: Update

        Incoming Telegram update.

      Returns Promise<boolean>

      true if text or caption matches.