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

    Class BaseFilterAbstract

    Abstract base class for update and message filters supporting Boolean logic chaining.

    All filters inherit .and(), .or(), and .not() methods to combine conditions.

    const filter = filters.TEXT.and(filters.ChatType.PRIVATE).not();
    

    Hierarchy (View Summary)

    Index
    • Combines this filter with another using logical AND (&&).

      Parameters

      • other: BaseFilter

        The other filter to combine with.

      Returns BaseFilter

      A new combined BaseFilter.

      const textInPrivate = filters.TEXT.and(filters.ChatType.PRIVATE);
      
    • Parameters

      Returns boolean | Promise<boolean>

    • Inverts this filter using logical NOT (!).

      Returns BaseFilter

      A new inverted BaseFilter.

      const notCommand = filters.COMMAND.not();
      
    • Combines this filter with another using logical OR (||).

      Parameters

      • other: BaseFilter

        The other filter to combine with.

      Returns BaseFilter

      A new combined BaseFilter.

      const photoOrDoc = filters.PHOTO.or(filters.DOCUMENT);