Commit graph

1489 commits

Author SHA1 Message Date
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
Jacob Bom
5a15d1b5d6 Add mpeg4_duration and gif_duration to inline gif and mpeg4gif 2017-05-21 14:38:12 +02:00
Jacob Bom
ad347b5c02 new_chat_member -> new_chat_members
Keep old for now... we can remove it in the future when telegram stops parsing it along.
Also: TODO: write proper Message tests
2017-05-21 14:32:36 +02:00
Jannes Höke
017fdeaae8 run yapf with --diff 2017-05-21 14:29:24 +02:00
Jannes Höke
ba6c4fd517 Bump version to v6.0.1 2017-05-21 14:25:40 +02:00
Jacob Bom
99ecac5649 assertRaisesRegex doesn't exist on py2 (also fuck yapf)
This deprecation is totally gonna come back and bite us when the regexp
gets removed completely in never version´
2017-05-21 14:10:55 +02:00
Jannes Höke
1c4c228cf1 add support for User.language_code (#624)
* add support for User.language_code

* Add language filter

Useful is you wanna do something like restrict your shop to a single or a few locales or something like that.
2017-05-21 14:00:53 +02:00
Jacob Bom
2e89e21261 Fix text_markdown and text_html (#623)
* Fix text_markdown and text_html

* Missed a few narrow build checks

* Added tests for emoji-first strings and emojis in url
2017-05-21 14:00:07 +02:00
Jacob Bom
7583fa9d65 Tests for video notes 2017-05-21 13:51:58 +02:00
Jacob Bom
2dd5290ec2 Add reply_video_note in line with other reply_* 2017-05-21 13:51:27 +02:00
Jacob Bom
41299244b7 Allow InputFile to handle video notes 2017-05-21 13:50:52 +02:00
Jacob Bom
0e2bcf28a6 Export VideoNote 2017-05-21 13:50:15 +02:00
Jacob Bom
2746ab77e5 Add sendVideoNote to Bot 2017-05-20 19:35:55 +02:00
Jacob Bom
ae39c902ed Add video_note to Message 2017-05-20 19:30:07 +02:00
Jacob Bom
65929a0813 VideoNote chatactions 2017-05-20 19:26:26 +02:00
Jacob Bom
4426eb0c61 Add VideoNote 2017-05-20 19:25:24 +02:00
Jacob Bom
d4f2f2e077 Getting instead of popping
I really think we should be popping and I'm unable to see why it makes our tests fail, but for now.. rolling back.
2017-05-20 19:02:01 +02:00
Jacob Bom
73d75b964a Remove extra space from payment provider token 2017-05-20 18:55:21 +02:00
Jacob Bom
45897048aa Add invoice test and there's no EUD currency, whoops 2017-05-20 18:51:31 +02:00
Jacob Bom
76db279624 We have to send and array... that's new... 2017-05-20 18:46:39 +02:00
Jacob Bom
a97da5cb20 Sooo apparently python 2 doesn't like ‘ (\xe2) 2017-05-20 17:36:10 +02:00
Jacob Bom
9f6ec125b9 Basic tests for payment stuff 2017-05-20 17:31:46 +02:00
Jacob Bom
5f96c507b9 Payment ids should be unique... probably 2017-05-20 17:31:46 +02:00
Jacob Bom
402e1381bb OrderInfo can be completely empty
In which case it should still be an OrderInfo not None
2017-05-20 17:31:46 +02:00
Jacob Bom
b276b06b31 Pop instead of get if our name doesn't match telegrams (user/from_user) 2017-05-20 17:31:46 +02:00
Jacob Bom
b69ecc3015 Fix import order 2017-05-20 17:31:46 +02:00
Jacob Bom
77f06888cb MessageEntity != Sticker :P 2017-05-20 17:31:46 +02:00
Jannes Höke
6479e15578 Bump version to v6.0.0 2017-05-19 21:49:01 +02:00
Jannes Höke
5dd3a660e3 forgot some escaping 2017-05-19 20:57:52 +02:00
Eldinnie
e2a651afc8 Allow edited as seperate input (#608)
* Allow edited as seperate input

In short made it possible to tune messagehandler more to your wishes. and choose exactly what updates to receive. messages, edited_message or channel_post or a combination.

- Added the edited_updates argument to MessageHandler
- Added DepricationWarning when using allow_edited
- replaced _is_allowed_message and _is_allowed_channel_post with _is_allowed_update
- Modified tests to reflect new way

* oops

Spelled deprecation wrong
made an error in the _is_allowed_update.

* Python 2 does not have assertWarns.

* remove unneeded statements
2017-05-19 20:26:10 +02:00
Jacob Bom
834c1ab3c5 Merge branch 'master' into payment 2017-05-19 20:25:46 +02:00
Evgen
33512ffd2e Improved CommandHandler (#613)
* Improved CommandHandler

Now you can pass list of commands instead of one command

* Added tests for list of commands

* Return backward compatibility

Renamed `commands` to `command` in CommandHandler

* Added test for a command not in the list

* Fixed py2 unicode command support in `CommandHandler`
2017-05-19 20:21:37 +02:00
Evgen
c2c5452829 Updated docstring in deleteMessage methods (#618)
* Removed "undocumented" notice

* Updated docstring according to Bot API documentation

* Removed extra line
2017-05-19 20:21:20 +02:00
Jacob Bom
c78d697b0e Add invoice and successful_payment to Message 2017-05-19 20:06:58 +02:00
Jacob Bom
2929c76248 Fix docstring for Message 2017-05-19 20:04:24 +02:00
Jacob Bom
034bcf0895 Add pay inlinekeyboardbutton type 2017-05-19 19:49:31 +02:00
Jacob Bom
8be57198b4 New payment bot methods
sendInvoice, answerShippingQuery, and answerPreCheckoutQuery
2017-05-19 19:46:42 +02:00
Jacob Bom
8e62b02ff6 Add new payment classes
Invoice, LabeledPrice, OrderInfo, PreCheckoutQuery, ShippingAddress, ShippingOption, ShippingQuery and SuccessfulPayment
2017-05-19 19:41:06 +02:00
Jannes Höke
9aa5522694 sanitize html and markdown in Message.text_html and text_markdown (#621)
* sanitize html and markdown in Message.text_html and text_markdown

* add import for escape_html
2017-05-19 19:11:40 +02:00
Noam Meltzer
9720f59d7e Fix docs (#614)
* Spelling fixes in `README.rst`

Fixes #609 and #610

* Fixed and added some type hints in docstrings
2017-05-17 22:46:06 +03:00
evgfilim1
578627feca Fixed and added some type hints in docstrings 2017-05-17 21:41:08 +05:00
evgfilim1
257b8321f8 Spelling fixes in README.rst
Fixes #609 and #610
2017-05-16 22:59:02 +05:00
Eldinnie
4f2ea5b0f1 Update readme to reflect changed install procedure (#610)
Fixes #609
2017-05-16 10:32:36 +03:00
Noam Meltzer
9a2d5e0410 Update copyright notice to include 2017 - missing files from another PR 2017-05-15 00:37:40 +03:00
Jacob Bom
1b7f83625c Update copyright notice to include 2017
Not strictly needed, but it helps show that the project is being actively
developed which I find important.
2017-05-15 00:36:49 +03:00
Jacob Bom
da01601ff9 Add equality rich comparision operators to telegram objects (#604)
fixes #587
2017-05-15 00:29:31 +03:00
Evgen
752b64769d Fix for #601 (#603) 2017-05-12 17:42:02 +02:00