Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Telegram Bot API 5.1 #7

Closed
JDaniloC opened this issue Mar 9, 2021 · 0 comments
Closed

Telegram Bot API 5.1 #7

JDaniloC opened this issue Mar 9, 2021 · 0 comments

Comments

@JDaniloC
Copy link
Contributor

JDaniloC commented Mar 9, 2021

It was added the field "my_chat_member" and "chat_member" in the chat messages, so it's occuring the error:
Traceback (most recent call last): File "/home/XXXX/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/amanobot/loop.py", line 70, in run_forever self._update_handler(update) File "/home/XXXX/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/amanobot/loop.py", line 159, in <lambda> collectloop.input_queue.put(_extract_message(update)[1])) File "/home/XXXX/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/amanobot/loop.py", line 107, in _extract_message key = _find_first_key(update, ['message', File "/home/XXXX/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/amanobot/__init__.py", line 72, in _find_first_key raise KeyError('No suggested keys %s in %s' % (str(keys), str(d))) KeyError: "No suggested keys ['message', 'edited_message', 'poll', 'channel_post', 'edited_channel_post', 'callback_query', 'inline_query', 'chosen_inline_result', 'shipping_query', 'pre_checkout_query'] in {'update_id': 000000002, 'my_chat_member': {'chat': {'id': 0000000000, 'first_name': 'FIRSTNAME', 'username': 'USERNAME', 'type': 'private'}, 'actor': {'id': 0000000000, 'is_bot': False, 'first_name': 'FIRSTNAME', 'username': 'USERNAME'}, 'date': 1615254657, 'old_chat_member': {'user': {'id': 0000000001, 'is_bot': True, 'first_name': 'BOTNAME', 'username': 'BOTUSERNAME'}, 'status': 'member'}, 'new_chat_member': {'user': {'id': 0000000001, 'is_bot': True, 'first_name': 'BOTNAME', 'username': 'BOTUSERNAME'}, 'status': 'kicked', 'until_date': 0}}}"
It's needed to change the suggested keys.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant