If bot has been kicked of a chat, it tracebacks instead of ignoring/removing that chat #2

Open
opened 2020-11-17 12:14:38 +01:00 by pablo.iranzo · 3 comments
pablo.iranzo commented 2020-11-17 12:14:38 +01:00 (Migrated from gitlab.com)
Traceback (most recent call last):
  File "/root/velasco/velasco.py", line 249, in <module>
    main()
  File "/root/velasco/velasco.py", line 237, in main
    speakerbot.wake(updater.bot, wake_msg)
  File "/root/velasco/speaker.py", line 134, in wake
    send(bot, self.admin, wake)
  File "/root/velasco/speaker.py", line 44, in send
    return bot.send_message(cid, text, **kwargs)
  File "<decorator-gen-2>", line 2, in send_message
  File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/bot.py", line 78, in decorator
    result = func(*args, **kwargs)
  File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/bot.py", line 382, in send_message
    return self._message('sendMessage', data,  # type: ignore[return-value]
  File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/bot.py", line 215, in _message
    result = self._post(endpoint, data, timeout=timeout, api_kwargs=api_kwargs)
  File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/bot.py", line 184, in _post
    return self.request.post('{}/{}'.format(self.base_url, endpoint), data=data,
  File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/utils/request.py", line 325, in post
    result = self._request_wrapper('POST', url,
  File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/utils/request.py", line 250, in _request_wrapper
    raise BadRequest(message)
telegram.error.BadRequest: Chat not found
``` Traceback (most recent call last): File "/root/velasco/velasco.py", line 249, in <module> main() File "/root/velasco/velasco.py", line 237, in main speakerbot.wake(updater.bot, wake_msg) File "/root/velasco/speaker.py", line 134, in wake send(bot, self.admin, wake) File "/root/velasco/speaker.py", line 44, in send return bot.send_message(cid, text, **kwargs) File "<decorator-gen-2>", line 2, in send_message File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/bot.py", line 78, in decorator result = func(*args, **kwargs) File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/bot.py", line 382, in send_message return self._message('sendMessage', data, # type: ignore[return-value] File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/bot.py", line 215, in _message result = self._post(endpoint, data, timeout=timeout, api_kwargs=api_kwargs) File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/bot.py", line 184, in _post return self.request.post('{}/{}'.format(self.base_url, endpoint), data=data, File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/utils/request.py", line 325, in post result = self._request_wrapper('POST', url, File "/root/velasco/.tox/velasco/lib/python3.9/site-packages/telegram/utils/request.py", line 250, in _request_wrapper raise BadRequest(message) telegram.error.BadRequest: Chat not found ```
pablo.iranzo commented 2020-11-17 12:14:53 +01:00 (Migrated from gitlab.com)

changed the description

changed the description
vylion commented 2021-01-22 20:45:40 +01:00 (Migrated from gitlab.com)

I have been postponing the chat deletion mechanisms because I couldn't decide on a single method. I'll make sure to add it on the next patch.

I have been postponing the chat deletion mechanisms because I couldn't decide on a single method. I'll make sure to add it on the next patch.
vylion commented 2021-01-22 20:46:26 +01:00 (Migrated from gitlab.com)

assigned to @vylion

assigned to @vylion
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vylion/velascobot#2
No description provided.