Commit graph

858 commits

Author SHA1 Message Date
Jannes Höke
d5583190b8 Bump version to v6.1.0 2017-06-18 12:35:16 +02:00
Jacob Bom
faddb92395 Clean up Bot code a bit (#673)
* Clean up Bot code a bit

- Move decorators to module. It really wasn't clear how decorators inside classes work, and why they didn't have a self parameter, but still wasn't static. This also makes them effectively private without having to underscore them, which I think we should have done long time ago atm. Note that this might break backwards compatibility slightly (only if people are daft enough to have used the decorators themselves)
- Don't call _message_wrapper directly. Ever. Instead always use the message decorator, since it's what it's there for. Closes #627
- Don't use the message decorator if the method isn't supposed to return a message. The decorator could handle values like True (which is often the return value), but to someone reading the code, it seems like it's a message returning method even when it wasn't.
- Always document timeout and **kwargs
- Log all methods

* Add test to make sure timeout propagates properly despite decorators
2017-06-18 12:14:24 +02:00
saschalalala
9b5e014a0a Simplification of boolean checks (#662)
* Simplification of boolean checks

* Cast ok to bool for Telegram API json encoding
2017-06-18 12:09:32 +02:00
Jannes Höke
845312da59 Merge branch 'master' of github.com:python-telegram-bot/python-telegram-bot 2017-06-16 04:16:45 +02:00
saschalalala
3863b4f371 Rename shortcut functions to snake_case (#661)
* Rename shortcut functions to snake_case

* More function renaming

* Example function rewrite

* Add myself to authors.rst

* More function renaming

* Rename mockbot test functions

* Break comment line for flake max line length
2017-06-14 00:07:03 +02:00
alateas
6877886f7d Change hard-coded 20. to timeout parameter (#663)
* Change hard-coded 20. to timeout paramter

Passing timeout parameter to _message_wrapper in send_audio instead of hard-coded 20 seconds

* add myself to contributors
2017-06-14 00:01:38 +02:00
Jeff
a68e0ad044 bugfixes on error in answer_shipping_query and answer_precheckout_query 2017-06-11 03:45:48 +08:00
Jannes Höke
179fc141bb Merge branch 'master' of github.com:python-telegram-bot/python-telegram-bot 2017-06-10 21:24:28 +02:00
Noam Meltzer
da8a3cee44 Merge pull request #631 from jeffffc/paymenthandlers
Add both handlers for queries from new Payment API
2017-06-09 18:23:29 +03:00
Eldin
bc3669fa4b make commandhandler case insensitive 2017-06-09 17:45:15 +03:00
Jeff
4247dc0e21 tiny changes upon PR review 2017-06-08 09:47:19 +08:00
Jacob Bom
896392d01e Merge branch 'master' into fix-docs 2017-06-07 13:12:32 +02:00
Jacob Bom
61c5d6ff08 Remove more warnings 2017-06-07 13:07:45 +02:00
Jacob Bom
aa1c4e0e02 Fix most of "more than one target found for cross-reference" warnings 2017-06-07 12:53:02 +02:00
Noam Meltzer
0fb00c4c8b When Promise running throws an uncaught exception - log it 2017-06-03 16:34:03 +03:00
Noam Meltzer
2680740316 Merge pull request #641 from azogue/fixes
fix setting default mimetype of inputfile
2017-06-03 00:22:32 +03:00
Jeff
eaf765dcbc Remove duplicated/useless codes, added Filters.invoice test 2017-06-03 01:48:30 +08:00
Jeff
e9d08c6f7a Merge branch 'master' into paymenthandlers-new
# Conflicts:
#	telegram/bot.py
#	telegram/message.py
#	telegram/precheckoutquery.py
#	telegram/shippingquery.py
2017-06-03 01:09:17 +08:00
Noam Meltzer
137ffe2e73 Merge remote-tracking branch 'origin/master' into payment 2017-06-01 22:01:04 +03:00
Noam Meltzer
c4b78673a3 payment: cr fixes 2017-06-01 21:52:47 +03:00
evgfilim1
5b1252ac2d Perfomance optimizations
Using `or` instead of `|`
2017-06-01 16:36:32 +05:00
evgfilim1
d98b18d1e3 Added new status_update filters 2017-06-01 07:09:30 +05:00
Jannes Höke
9d6c394b02 Bump version to v6.0.3 2017-05-29 22:55:15 +02:00
Jannes Höke
1951d6fdcd Bump version to v6.0.2 2017-05-29 21:24:12 +02:00
azogue
b46bdf5304 fix setting default mimetype of inputfile 2017-05-29 08:30:29 +02:00
Noam Meltzer
cd24bb4ba5 payment: Small fixes
- Semantic fixes bot.py (if XXX is not None: ...).
 - Documentation fixes (arguments which are optional).
2017-05-26 20:02:18 +03:00
Noam Meltzer
ae33d33580 Merge pull request #625 from python-telegram-bot/videonote
Add VideoNote
2017-05-26 19:34:13 +03:00
Noam Meltzer
706f79fa99 Fix setup.py with urllib3 vendoring
fixes #635
2017-05-26 19:24:54 +03:00
Noam Meltzer
a5bfc52326 videonote: Semantic fix according to CR 2017-05-26 18:36:21 +03:00
Noam Meltzer
858684ab64 Merge pull request #628 from python-telegram-bot/may18minor
May 18 minor changes
2017-05-26 18:23:31 +03:00
Jacob Bom
f4c6197c5f Update filters to new_chat_members instead of new_chat_member 2017-05-25 14:45:47 +02:00
Jacob Bom
a7044562af Fix stuff as per @tsnoam's comments 2017-05-25 14:16:53 +02:00
Jacob Bom
27a4fa8dba Move *_duration attributes as to keep backwardscompat 2017-05-25 14:05:08 +02:00
Jacob Bom
a41ee3b040 Actually deprecate new_chat_member to help users switch 2017-05-25 14:02:41 +02:00
Jacob Bom
8499dcc33c Better deprecation warnings
Actually shows where in the users code the error happened, not just where the warning came from in our internal code
2017-05-25 13:53:35 +02:00
Noam Meltzer
ff897ce9ef Avoid confusion with user's urllib3 by renaming vendored urllib3 2017-05-24 13:14:33 +03:00
Jeff
f314915954 fix typo again 2017-05-23 16:26:04 +08:00
Jeff
1bf0078573 add missing "need_email" in sendInvoice, fix pep8/flake 2017-05-23 16:21:45 +08:00
Jeff
96171112bf fix crucial typo in filters 2017-05-22 23:42:09 +08:00
Jeff
27238c52e2 add successful_payment filter under message 2017-05-22 23:39:28 +08:00
Jeff
43f4128b31 fix answer* methods not sending api requests 2017-05-22 22:55:19 +08:00
Jeff
1142953108 add checks for answer* methods 2017-05-22 22:47:35 +08:00
Jeff
1e250f2415 add kwargs to answer* methods 2017-05-22 21:37:15 +08:00
Jeff
8f2f29c7d4 fix typo, add bot and kwargs to class init 2017-05-22 21:32:42 +08:00
Jeff
3767d26fc8 Add both handlers for queries from new Payment API (#630)
* add handlers for new payment API

* fix typo

* fix docstring mistakes

* added missing 'from_user'
2017-05-22 14:07:53 +02:00
Jacob Bom
630b63ec10 Add payment filters 2017-05-22 12:13:00 +02:00
Jacob Bom
01430a24a5 Import order fix 2017-05-21 15:51:01 +02:00
Jacob Bom
acda19b7e7 Merge branch 'may18minor' into beta 2017-05-21 15:45:40 +02:00
Jacob Bom
48fa3d975b Merge branch 'videonote' into beta
# Conflicts:
#	telegram/__init__.py
#	telegram/message.py
2017-05-21 15:45:20 +02:00
Jacob Bom
d220ff4e38 Merge branch 'payment' into beta 2017-05-21 15:42:24 +02:00