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

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
This commit is contained in:
SwissCorePy
2021-06-19 20:13:53 +02:00
parent 795f7fff7f
commit 0370a9f277
4 changed files with 71 additions and 40 deletions

View File

@@ -62,8 +62,11 @@ def update_type(message):
pre_checkout_query = None
poll = None
poll_answer = None
my_chat_member = None
chat_member = None
return types.Update(1001234038283, message, edited_message, channel_post, edited_channel_post, inline_query,
chosen_inline_result, callback_query, shipping_query, pre_checkout_query, poll, poll_answer)
chosen_inline_result, callback_query, shipping_query, pre_checkout_query, poll, poll_answer,
my_chat_member, chat_member)
@pytest.fixture()
@@ -78,9 +81,11 @@ def reply_to_message_update_type(reply_to_message):
pre_checkout_query = None
poll = None
poll_answer = None
my_chat_member = None
chat_member = None
return types.Update(1001234038284, reply_to_message, edited_message, channel_post, edited_channel_post,
inline_query,
chosen_inline_result, callback_query, shipping_query, pre_checkout_query, poll, poll_answer)
inline_query, chosen_inline_result, callback_query, shipping_query, pre_checkout_query,
poll, poll_answer, my_chat_member, chat_member)
def next_handler(message):