MessageFilters: Filter message updates

MessageFiltersR Documentation

Filter message updates

Description

Predefined filters for use as the filter argument of class MessageHandler.

Usage

MessageFilters

Format

A list with filtering functions.

Details

See BaseFilter and filtersLogic for advanced filters.

Functions

  • all: All Messages.

  • text: Text Messages.

  • command: Messages starting with /.

  • reply: Messages that are a reply to another message.

  • audio: Messages that contain audio.

  • document: Messages that contain document.

  • photo: Messages that contain photo.

  • sticker: Messages that contain sticker.

  • video: Messages that contain video.

  • voice: Messages that contain voice.

  • contact: Messages that contain contact.

  • location: Messages that contain location.

  • venue: Messages that are forwarded.

  • game: Messages that contain game.

Examples

## Not run: 
# Use to filter all video messages
video_handler <- MessageHandler(callback_method, MessageFilters$video)

# To filter all contacts, etc.
contact_handler <- MessageHandler(callback_method, MessageFilters$contact)

## End(Not run)

telegram.bot documentation built on Sept. 7, 2022, 5:07 p.m.