UNPKG

vvlad1973-telegram-framework

Version:
26 lines (20 loc) 1.01 kB
# Filters for incoming updates Filters are used to subscribe to the update receive event. Filter is an object of the following structure: ```javascript { type: <regexp for type>, contents: <regexp for contents>, params: <regexp for params>, chat: <regexp for chat_id>, chat_type: <regexp for chat_type>, user: <regexp for user_id> } ``` where: - *\<regexp for type\>* - expression for matching type of message - *\<regexp for contents\>* - expression for matching type of message - *\<regexp for params\>* - expression for matching in params substring in messages with bot commands, optional - *\<regexp for chat_id\>* - may be ID of particular chat or *private* for updates wich sent to the bot directly, optional. If not specified, will receive updates of any chat - *\<regexp for chat_type\>* - expression for matching type of chat (one of values: 'private', 'group', 'supergroup') - *\<regexp for user_id\>* - ID of user whom was send this message