Learn R Programming

telegram.bot (version 3.0.0)

filtersLogic: Combining filters

Description

Creates a function which returns the corresponding logical operation between what f and g return.

Usage

# S3 method for BaseFilter
!(f)

# S3 method for BaseFilter &(f, g)

# S3 method for BaseFilter |(f, g)

Arguments

f, g

Arbitrary BaseFilter class functions.

Details

See BaseFilter and MessageFilters for further details.

Examples

Run this code
not_command <- !MessageFilters$command
text_and_reply <- MessageFilters$text & MessageFilters$reply
audio_or_video <- MessageFilters$audio | MessageFilters$video

Run the code above in your browser using DataLab