python-telegram-bot/telegram
Eldinnie 2c5eade4f0 Update Filters, CommandHandler and MessageHandler (#1221)
* update_filter attribute on filters

Makes it possible to have filters work on an update instead of message, while keeping behavior for current filters

* add update_type filter

* Messagehandler rework

- remove allow_edited (deprecated for a while)
- set deprecated defaults to None
- Raise deprecation warning when they're used
- add sensible defaults for filters.
- rework tests

* Commandhandler rework

* Remove deprecation test from new handler

* Some tweaks per CR

- rename update_types -> updates
- added some clarification to docstrings

* run webhook set test only on 3.6 on appveyor

* update_filter attribute on filters

Makes it possible to have filters work on an update instead of message, while keeping behavior for current filters

* add update_type filter

* Messagehandler rework

- remove allow_edited (deprecated for a while)
- set deprecated defaults to None
- Raise deprecation warning when they're used
- add sensible defaults for filters.
- rework tests

* Commandhandler rework

* Remove deprecation test from new handler

* Some tweaks per CR

- rename update_types -> updates
- added some clarification to docstrings

* run webhook set test only on 3.6 on appveyor

* Changes per CR

* Update travis to build v12

* small doc update

* try to make ci build version branches

* doc for BaseFilter

* Modify regexfilter and mergedfilter

Now returns a list of match objects for every regexfilter

* Change callbackcontext (+ docs)

* integrate in CommandHandler and PrefixHandler

* integrate in MessageHandler

* cbqhandler, iqhandler and srhandler

* make regexhandler a shell over MessageHandler

And raise deprecationWarning on creation

* clean up code and add some comments

* Rework based on internal group feedback

- use data_filter instead of regex_filter on BaseFilter
- have these filters return a dict that is then updated onto CallbackContext instead of using a list is before
- Add a .match property on CallbackContext that returns .matches[0] or None

* Fix and add test for callbackcontext.match

* Lots of documentation fixes and improvements [ci skip]
2019-02-13 12:07:25 +01:00
..
ext Update Filters, CommandHandler and MessageHandler (#1221) 2019-02-13 12:07:25 +01:00
files pep8 fixes 2018-11-01 11:18:07 +02:00
games Bot API 4.0 (#1168) 2018-08-29 14:18:58 +02:00
inline Add convenience classmethods for InlineKeyboardMarkup (fixes #1186) (#1260) 2019-01-04 21:04:45 +01:00
passport pep8 fixes 2018-11-01 11:18:07 +02:00
payment remove unnecessary to_dict() (#834) 2018-02-19 10:31:38 +02:00
utils Fix #1328: custom timeout argument does not work (#1330) 2019-01-30 19:38:15 +01:00
vendor fix accidental commit to submodule config 2018-11-01 11:25:52 +02:00
__init__.py fix last flake8 errors 2018-11-01 10:52:36 +01:00
__main__.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
base.py Bot API 4.0 (#1168) 2018-08-29 14:18:58 +02:00
bot.py Remove message decorator to fix default timeouts. (#1156) 2019-02-13 11:37:13 +01:00
callbackquery.py Remove message decorator to fix default timeouts. (#1156) 2019-02-13 11:37:13 +01:00
chat.py Bot API 4.0 (#1168) 2018-08-29 14:18:58 +02:00
chataction.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
chatmember.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
choseninlineresult.py remove unnecessary to_dict() (#834) 2018-02-19 10:31:38 +02:00
constants.py Change MAX_CAPTION_LENGTH to 1024 (#1262) 2018-10-16 19:51:57 +02:00
error.py Add Conflict error (HTTP error code 409) (#1154) 2018-10-29 22:08:52 +01:00
forcereply.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
keyboardbutton.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
message.py Fix #1335: Message.MESSAGE_TYPES does not contain "left_chat_member" (#1336) 2019-02-08 11:02:54 +01:00
messageentity.py Bot API 4.0 (#1168) 2018-08-29 14:18:58 +02:00
parsemode.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
replykeyboardmarkup.py Reflow docstrings in replykeyboardmarkup to satisfy flake8 2019-01-30 19:50:33 +01:00
replykeyboardremove.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
replymarkup.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
update.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
user.py Bot API 4.0 (#1168) 2018-08-29 14:18:58 +02:00
userprofilephotos.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00
version.py Releasing v11.1 2018-09-01 17:27:35 +02:00
webhookinfo.py Update headers to 2018 (#962) 2018-01-04 17:16:06 +02:00