1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00
Commit Graph

326 Commits

Author SHA1 Message Date
SwissCorePy
0370a9f277 Added class ChatMemberUpdated
* Added class `ChatMemberUpdated` to types
* Simplified `de_json` functions in `WebhookInfo` and `Update` classes (for overall more consistent code)
* changed `options_ids` to ´option_id` in class `PollAnswer`
* Added test for `ChatMemberUpdated` class in `test_types.py` and added the fields `my_chat_member` and `chat_member` to the `Update` class and its tests
2021-06-19 20:13:53 +02:00
SwissCorePy
795f7fff7f Some small changes
* Fixed type warnings in some editors by changing `var: Type = None` to `var: Union[Type, None] = None`
* changed some args from `obj['arg']` to `obj.get('arg')` if arg is optional
* better PEP-8 compliance for less weak warnings
* added tests for the new type `ChatInviteLink`
2021-06-19 17:59:55 +02:00
SwissCorePy
a9ae070256 Update types.py 2021-06-18 22:37:31 +02:00
SwissCorePy
63fe6e01d1 Fixed the errors from my last PRs
I testet all using pytest and python versions 3.6-3.9 on macOS
2021-06-18 22:35:49 +02:00
SwissCorePy
bbafdd1c1d Some Updates
> Added lot of type hints to types.py
> Added some new fields from TelegramBotAPI to pyTelegramBotAPI
> fixed `circular import error in util.py
> Added functions `log_out` and `close` to __init__.py and apihelper.py
> And some more small changes
2021-06-17 20:28:53 +02:00
Badiboy
53c98328c1 send_poll fix with PollOptions
Now send_poll correctly operates with PollOptions passed as array of PollOption.
2021-05-12 00:26:33 +03:00
David256
2f69917a82 Change fstrings to string formatting 2021-04-01 16:52:12 -05:00
David256
6c90da793e New property full_name 2021-04-01 14:56:08 -05:00
Alireza
b684c4f60d Fix Things on copyMessage 2021-01-12 11:17:53 +03:30
Badiboy
6559f431b7 Bot API update
Bot API conformance up to 4.4

Added webhook parameters from 5.0
2020-12-29 19:24:41 +03:00
Badiboy
5824d47590 added only_if_banned to unban_chat_member 2020-11-18 02:22:52 +03:00
Badiboy
fa3ca84d24 Animation content_type
"When you send gif telegram gives you animation and document at same time in update and when you parse that first if is animation and second is document because of this the content_type set document not animation"
2020-11-03 17:46:19 +03:00
andvch
36a3ce62c4
Fix broken text_mention html formatting 2020-10-14 12:06:49 +03:00
Badiboy
00c2e9b51c Piece death fix 2020-09-22 01:41:51 +03:00
Badiboy
29711e2425 Merge remote-tracking branch 'upstream/master' 2020-09-22 01:34:55 +03:00
Badiboy
75a5dd1492 Minor bugfix 2020-09-22 01:34:49 +03:00
meoww-bot
9ab906e60c
fix: simplify code
json.loads(button.to_json()) equals to button.to_dict()
2020-09-02 18:09:14 +08:00
meoww-bot
a803edd09b
fix: button in markup should be obj, not json text 2020-09-02 09:25:23 +08:00
meoww-bot
32a9e65ecc
fix: reply_markup does not change content_type 2020-09-02 09:12:49 +08:00
meoww-bot
decad450d0
feat: make InlineKeyboardMarkup JsonDeserializable
feat: make InlineKeyboardMarkup JsonDeserializable, add de_json func to InlineKeyboardMarkup object
2020-09-01 18:13:22 +08:00
meoww-bot
630a9a5b2c
feat: make InlineKeyboardButton JsonDeserializable
feat: make InlineKeyboardButton JsonDeserializable, add de_json func to InlineKeyboardButton Object
2020-09-01 18:07:45 +08:00
meoww-bot
cdae65116b
feat: make LoginUrl JsonDeserializable
feat: make LoginUrl JsonDeserializable, add de_json func
2020-09-01 18:03:21 +08:00
meoww-bot
6832c33733 feat: Added the field reply_markup to the Message
Added the field `reply_markup` to the Message object
2020-08-31 12:00:56 +00:00
meoww-bot
e811163b5f
UPG: Added the field file_unique_id
Added the field file_unique_id to the objects Animation, Audio, Document, PassportFile, PhotoSize, Sticker, Video, VideoNote, Voice, File and the fields small_file_unique_id and big_file_unique_id to the object ChatPhoto. (Bot API 4.5)
2020-08-29 04:29:02 +08:00
Badiboy
bab9b4077d Bot API support checked/updated up to 4.2 2020-08-25 18:18:51 +03:00
Badiboy
cdd48c7aed Empty list optimization, Py2 arteacts removed,
Empty list optimization: None instead of [].

Py2 arteacts removed: no more six moudle used.
2020-08-24 16:02:35 +03:00
Mr. Dog
ec79d1dc1e
Keyboard bugfix 2020-08-04 23:45:33 +05:00
Badiboy
c6f51f6c55 CopyPaste bugfix 2020-08-04 18:28:35 +03:00
Badiboy
a5fd407eb6 Bugfix and DISABLE_KEYLEN_ERROR
Bugfix and DISABLE_KEYLEN_ERROR to supress keyboard length errors.
2020-08-04 12:29:56 +03:00
Badiboy
cc36207992 Minor keyboard update followup 2020-08-02 18:58:22 +03:00
Mr. Dog
4e5fb59fc0
Replace exceptions with warnings
Also further PIL support added
2020-08-02 20:20:33 +05:00
mrpes
5823ca5613
Minor keyboard code redesign 2020-08-01 01:28:56 +05:00
Badiboy
ce3c91b619
Merge pull request #919 from Badiboy/master
Minor updates in code
2020-07-21 01:27:32 +03:00
Badiboy
dbe9ce49df Minor updates in code 2020-07-21 01:20:01 +03:00
EskiSlav
c533a52e39 Restored necessary comment 2020-07-18 00:25:00 +03:00
EskiSlav
b50eb1bafb Added nested entities from Bot API 4.5 2020-07-17 13:43:45 +03:00
Purya Jafari
49398f5c61
Update types.py
Sending stickers everytime have different file_id, so for detecting special stickers we need a unique parameter.
2020-07-07 01:31:33 +04:30
Kwisatz Haderach
44872ce87d
Complete User Class
Added following fields:
can_join_groups
can_read_all_group_messages
supports_inline_queries
2020-06-22 13:18:13 +02:00
oleg
592dcbfedf Add PollAnswer type;
Add poll_answer_handler
2020-05-18 12:05:30 +05:00
oleg
03b02561a5 Add request_poll attribute to KeyboardButton;
Add KeyboardButtonPollType object
2020-05-18 11:48:54 +05:00
dr_forse
75a018e18b add PollAnswer, poll_answer_handler; make User Serializable and Dictionaryble; some pep fixes 2020-05-12 01:09:34 +01:00
Anthony Byuraev
ee00d0458d Fix some bugs 2020-05-11 22:26:03 +03:00
Anthony Byuraev
a60253bf60 UPG: Add ChatPermissions, set_chat_permissions 2020-05-11 16:38:09 +03:00
Anthony Byuraev
8be9bcc8ed UPG: Add custom_title, slow_mode_delay 2020-05-09 20:28:29 +03:00
Anthony Byuraev
1824637617 UPG: Refactoring InlineKeyboardMarkup 2020-05-09 20:06:33 +03:00
Badiboy
2849e67029 Fix to_dic->to_dict refactoring 2020-05-09 00:51:18 +03:00
Anthony Byuraev
a56fb8cc54 UPG: Add BotCommand, setMyCommands 2020-05-08 21:06:39 +03:00
dr_forse
99c63e9eba add emoji field for dice 2020-04-27 06:30:05 +01:00
Badiboy
bb4f6a7190 Polls are updated to the latest API state.
Polls are updated to the latest API state.

Minor code refactoring.
2020-04-25 22:22:08 +03:00
dr_forse
51b1fb7695 added Dice and send_dice 2020-04-15 06:10:05 +01:00
Badiboy
dab80d421b Refactoring update 2 2020-04-11 17:38:47 +03:00
Badiboy
247fe6e947 Refactoring bugfix 2020-04-11 17:06:14 +03:00
Badiboy
995814d846 Refactoring and API conformance
Refactoring.

new_chat_member is out of support.

Bugfix in html_text.

Started Bot API conformance checking.
2020-04-11 16:54:25 +03:00
Alexander Tkachev
d2f9c51a5a Handle Poll update 2020-03-09 17:25:54 +07:00
Quantum
dfac26706e
Add is_anonymous flag to Poll type 2020-02-07 12:53:31 +03:00
Badiboy
7adec8bd90
Merge pull request #673 from TahaPY/master
Added Animation and is_animated for stickers
2020-01-03 17:51:53 +03:00
Badiboy
0603a0df4c
Update types.py
Animation is moved before document to save backward compatibility. content_type = 'document' should override content_type = 'animation' to save previous behaviour.
2020-01-03 17:51:05 +03:00
Badiboy
769ff8008e
Merge pull request #599 from KanerL/KanerL-patch-shipping-option
ShippingOption.add_price returns "self" (for chaining etc.).
2020-01-03 01:28:37 +03:00
Badiboy
86644c05f7
Merge pull request #539 from Badiboy/master
"timeout" parameter for send_message
Fix kick_chat_member return type
HTML symbols not replaced
2020-01-03 00:50:24 +03:00
Badiboy
3a3bab5b92
Merge pull request #480 from SkymanOne/patch-1
create field forward_from_message_id in Message
2020-01-03 00:46:27 +03:00
Badiboy
bf844ed202 HTML symbols not replaced
HTML symbols not replaced because return is before replace.
2020-01-01 13:46:18 +03:00
Vadim Ryazanov
f241ef1eac passport_data content type added 2019-08-27 11:55:14 +03:00
Mohammad Taha
8f8276314e
Merge pull request #1 from cmd410/master
Support for animated stickers
2019-08-16 20:42:08 +00:00
cmd410
f0835a1a14 Support for animated stickers 2019-07-30 12:46:39 +03:00
Taha
be3b6f88e8 Added Animation 2019-07-14 18:53:59 +04:30
FrankWang
151880f391
Merge pull request #659 from OslikAi/master
Add Poll
2019-06-28 21:02:23 +08:00
Vova Pytsyuk
600002e158 Fixed bug with LoginUrl 2019-06-15 23:09:59 +03:00
Vova Pytsyuk
3c62e9d391 Added LoginUrl to types 2019-06-15 22:59:41 +03:00
Tiger 1
9624b45314 add Poll, sendPoll, stopPoll 2019-06-06 21:47:08 +03:00
KanerL
ceea457cf1
Update shipping option
Setting list of ShippingOptions like in payments_example.py
shipping_options = [
    ShippingOption(id='instant', title='WorldWide Teleporter').add_price(LabeledPrice('Teleporter', 1000)),
    ShippingOption(id='pickup', title='Local pickup').add_price(LabeledPrice('Pickup', 300))]
gives us [None,None],so It's better add_price to return self
2018-11-12 01:43:00 +02:00
FrankWang
2d6c2a345f
Merge pull request #577 from rmed/master
Add check for parse_mode in BaseInlineQueryResultCached
2018-10-19 10:07:40 +08:00
Rafael Medina
891988be93
Added check for parse_mode in BaseInlineQueryResultCached. Should fix #571 2018-09-15 20:25:06 +02:00
uburuntu
36621bb22a fix: some intendation 2018-08-17 13:01:03 +03:00
uburuntu
6a4c7e731b fix: delete doubled Sticker class (left a new one) 2018-08-17 12:46:40 +03:00
uburuntu
e419214b49 fix: python2 positional argument specifiers 2018-08-14 17:29:35 +03:00
uburuntu
7dd53b1396 fix: support python2 super() 2018-08-14 12:23:15 +03:00
uburuntu
cf69a06ab8 enh: make code better and enhance test case 2018-08-10 16:48:09 +03:00
uburuntu
8ac6e664c5 new: InputMediaAnimation, InputMediaAudio, InputMediaDocument, editMessageMedia
Added support for editing the media content of messages: added the method editMessageMedia and new types InputMediaAnimation, InputMediaAudio, and InputMediaDocument.
2018-08-09 19:16:38 +03:00
heyyyoyy
5035e0ce80 Added parse mode for objects in Inline mode 2018-08-02 21:15:33 +03:00
Badiboy
9c79ba2f87 html_text fix and html_caption
html_text now works with text_link
html_caption now works for caption/caption_entities
2018-05-14 13:29:34 +03:00
FrankWang
5a102ed8fa
Merge pull request #492 from sviat9440/master
Bugfixes (message.html_text offset)
2018-05-04 07:19:28 +08:00
eternnoir
91f213ff34 Fix #501 2018-04-27 15:47:03 +08:00
sviat9440
ffe3a0c3d7 Update types.py
-- Fix encoding bug (emoji shifted offset)
2018-04-15 19:19:29 +03:00
sviat9440
36d088dfbf Bugfixes and minor improvements 2018-04-04 10:47:37 +03:00
sviat9440
0422e62f65
Update types.py
Fix
2018-03-21 10:45:34 +03:00
sviat9440
82e252ec46
Update types.py
Fix
2018-03-21 10:44:37 +03:00
sviat9440
c11a9f810c
Update types.py
Added 'json' property to class 'Message', to quickly save a message to the database
2018-03-21 07:35:42 +03:00
German
d17d28a144
create field forward_from_message_id in Message
https://core.telegram.org/bots/api#message
2018-03-20 23:36:29 +03:00
heyyyoyy
2e199a5684 Bot Api 3.6 2018-02-14 20:27:55 +00:00
FrankWang
55302cb972
Merge pull request #445 from heyyyoyy/update_send_media_group
Added support for local files in the sendMediaGroup method
2018-02-01 19:24:50 +08:00
eternnoir
afac177d7d Fix missing media_group_id in message. 2018-01-24 19:05:38 +08:00
heyyyoyy
2637e29dbe Updated sendMediaGroup method 2018-01-15 16:08:50 +03:00
eternnoir
b2f376a906 Remove debug message. Add content_type 2017-11-30 23:34:07 +08:00
eternnoir
8528ca9e4e Add some message content type. Fix #426 2017-11-29 13:48:34 +08:00
eternnoir
e1a3ccadb7 Add sendMediaGroup method. 2017-11-29 13:45:25 +08:00
eternnoir
8bdbc24014 Fix ShippingOption to_json. #414 2017-11-13 10:25:39 +08:00
eternnoir
3986f33d3a Fix caption_entities without default value. 2017-11-06 08:42:57 +08:00
Evgeny Petrov
5f8d99664e Bot API 3.4: new methods for live locations, new objects. 2017-10-22 19:50:51 +03:00
Evgeny Petrov
600c014515 Added missing author_signature field to Message object
`author_signature` field was checked, but never added to `Message` object.
2017-09-22 01:08:54 +03:00
Evgeny Petrov
211f1c607d Bot API 3.3:
- Added the new field pinned_message to the Chat object.
- Added the new fields author_signature and forward_signature to the Message object.
- Added the new field is_bot to the User object.
2017-08-23 10:30:32 +03:00
eternnoir
af70313721 New method for v3.2 2017-08-06 14:25:25 +08:00
eternnoir
aefd666062 Update sticker set. 2017-08-06 12:00:26 +08:00
eternnoir
0632cfb9b0 Fix new chat members. 2017-07-02 21:24:19 +08:00
eternnoir
f97bb2f615 FIx missing declare 2017-07-01 11:05:14 +08:00
Evgeny Petrov
25a37db2bb Bot API v3.1 2017-06-30 19:47:09 +03:00
eternnoir
777a3afaaa Fix #314 2017-05-30 17:18:03 +08:00
eternnoir
639218b3bf New fields gif_duration in InlineQueryResultGif and mpeg4_duration in
InlineQueryResultMpeg4Gif.
2017-05-25 13:27:13 +08:00
eternnoir
b2449e64c2 Add pay in inline keyboard btn, 2017-05-25 11:48:16 +08:00
eternnoir
12791e1366 Add payments type to update and message. 2017-05-21 21:52:56 +08:00
eternnoir
5ed333492b All payment type done. 2017-05-21 21:45:12 +08:00
Kylmakalle
3f5596ddce new_chat_members content type and new send_action actions 2017-05-21 14:27:31 +03:00
Kylmakalle
6cda8d052c VideoNote support
Send and recieve round video messages.
Support for send_video_note metod and video_note content type.
2017-05-19 17:19:15 +03:00
i32ropie
35214b1270 Added language code for users 2017-05-18 23:40:10 +02:00
eternnoir
450ef42a83 Fix typo. 2017-04-30 19:40:27 +08:00
FrankWang
1058822f85 Merge pull request #266 from Yolley/patch-1
Added isinstance for bytes to function 'add' in ReplyKeyboardMarkup
2016-12-13 10:02:58 +08:00
Evgeny Petrov
12e7879325 Added max_connections and allowed updates to WebhookInfo 2016-12-12 19:29:57 +03:00
Yolley
d14bd9a36b Add isinstance for bytes to function 'add' in ReplyKeyboardMarkup
All explanation is here https://github.com/eternnoir/pyTelegramBotAPI/issues/265
2016-12-06 17:12:28 +03:00
eternnoir
509fae6792 Bug fix. 2016-12-03 15:17:06 +08:00
eternnoir
30ed6e37d3 Add channel_post, edited_channel_post support. 2016-12-03 13:28:22 +08:00
Evgeny Petrov
8c8be81bb9 Added optional forward_from_message_id
And changed `forward_date` to optional (as it should be)
2016-11-21 09:10:51 +03:00
Evgeny Petrov
b2cd3c9716 Added channel_post and edited_channel_post to Update object 2016-11-21 09:06:36 +03:00
Evgeny Petrov
1c9a9b9622 hide_keyboard -> remove_keyboard 2016-11-21 08:57:38 +03:00
Evgeny Petrov
1691e84d01 ReplyKeyboardHide -> ReplyKeyboardRemove
Since Telegram changed object name in API docs: https://core.telegram.org/bots/api#replykeyboardremove
2016-11-16 14:18:39 +03:00
eternnoir
7a6bb4dcc8 Remove type in InlineQueryResultGame. 2016-11-01 01:14:28 +08:00
eternnoir
e342b9fa6b Fix InlineQueryResultGame replymarkup do not to_dic. 2016-11-01 01:10:06 +08:00
Evgeny Petrov
2af9209005 Fixed KeyError when data field is None in CallbackQuery
obj['data'] raises KeyError when `data` is None, while obj.get('data') returns None
2016-10-30 18:23:57 +08:00
Evgeny Petrov
d2e1acde6a Fixed API object type mismatch 2016-10-29 23:23:39 +03:00
eternnoir
d1498979d4 Merge branch 'JrooTJunior-master' into feature-20161003update 2016-10-20 20:09:07 +08:00
Alex Root Junior
702763edd6 Get webhook info
https://core.telegram.org/bots/api#getwebhookinfo
2016-10-20 10:52:38 +03:00
FrankWang
d53a881ac4 Merge pull request #238 from Kondra007/patch-6
Added "all_members_are_administrators" field to Chat object
2016-10-12 12:01:46 +08:00
Evgeny Petrov
08dd7d1593 Added caption field to several objects
InlineQueryResultAudio, InlineQueryResultVoice, InlineQueryResultCachedAudio, InlineQueryResultCachedVoice
2016-10-11 22:57:16 +03:00
Evgeny Petrov
11aa5fcb85 Added "all_members_are_administrators" field to Chat object 2016-10-11 22:43:44 +03:00
eternnoir
8d65856dec New field callback_game in InlineKeyboardButton, new fields
game_short_name and chat_instance in CallbackQuery.
2016-10-08 22:04:44 +08:00
eternnoir
795a00f92c Add game in Message. InlineQueryResultGame 2016-10-08 20:06:08 +08:00
eternnoir
de740be506 Add class Game,Animation,GameHighScore. For Game feature. 2016-10-08 19:50:29 +08:00
eternnoir
a5ed76018d Fix venue Loacation dejson. 2016-09-17 07:38:18 +08:00
eternnoir
590b27ca8a Add ujson support. 2016-09-12 16:38:54 +08:00
eternnoir
4205e46608 Fix missing location object in InlineQuery. 2016-07-06 10:13:42 +08:00
eternnoir
29ef0e74af Fix typo. 2016-06-17 17:50:06 +08:00
eternnoir
d701fd6e1d Merge remote-tracking branch 'origin/feature-changes20160522' into api2.1 2016-06-07 19:30:01 +08:00
eternnoir
8e3c9d8d24 Add edited message handler. 2016-06-07 19:29:12 +08:00
eternnoir
468a535257 Fix de_json. 2016-06-07 19:08:52 +08:00
eternnoir
d2e7f4d8f2 Add 2.1 new method. 2016-06-07 19:00:44 +08:00
Pavel K
2f20d70e89 unicode strings for check_json 2016-06-04 21:18:09 +05:00
eternnoir
8c20f63022 Add user to MessageEntity. 2016-05-23 11:12:20 +08:00
eternnoir
f9c7497c5c Merge branch 'Kondra007-patch-3' into feature-changes20160522 2016-05-23 11:05:14 +08:00
Kondra007
1a45b4844a Fixed Travis build (again)
Yeah, I'm really sorry for all this errors, maybe tired a little bit.
2016-05-22 15:47:44 +03:00
Kondra007
8a9d89591b Fixed Travis build errors 2016-05-22 15:44:04 +03:00
Kondra007
234dd8cf9f Edited edit_date field
It's integer, not `Message`
2016-05-22 13:55:54 +03:00
Kondra007
6a98d27f1a Added edited_message to Update object
As of Bot API update 2.1, Update object now has optional edited_message field.
2016-05-22 13:35:21 +03:00