flexget.plugins.input.from_telegram module#
Plugin for telegram input.
- class flexget.plugins.input.from_telegram.TelegramInput[source]#
Bases:
objectParse any messages from Telegram and fills fields with regex.
Example:
token: <token> only_new: yes whitelist: - username: <my_username> - group: <my_group> - fullname: first: <my_first_name> sur: <my_surname> entry: <field>: <regexp to match value>
Note: If not declared, title will be the message
- on_task_input(**kwargs)#
- schema = {'additionalProperties': False, 'properties': {'entry': {'additionalProperties': {'format': 'regex', 'type': 'string'}, 'properties': {'title': {'format': 'regex', 'type': 'string'}, 'url': {'format': 'regex', 'type': 'string'}}, 'type': 'object'}, 'only_new': {'default': True, 'type': 'boolean'}, 'token': {'type': 'string'}, 'types': {'oneOf': [{'items': {'enum': ['private', 'group'], 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'enum': ['private', 'group'], 'title': 'single value', 'type': 'string'}]}, 'whitelist': {'items': {'oneOf': [{'additionalProperties': False, 'properties': {'username': {'type': 'string'}}, 'required': ['username'], 'type': 'object'}, {'additionalProperties': False, 'properties': {'fullname': {'additionalProperties': False, 'properties': {'first': {'type': 'string'}, 'sur': {'type': 'string'}}, 'required': ['first', 'sur'], 'type': 'object'}}, 'required': ['fullname'], 'type': 'object'}, {'additionalProperties': False, 'properties': {'group': {'type': 'string'}}, 'required': ['group'], 'type': 'object'}]}, 'minItems': 1, 'type': 'array'}}, 'required': ['token'], 'type': 'object'}#