Crash on /id command
When I send the /id command to the bot, the following crash can be seen in the logs:
keypongbot-1 | 2024-12-23 00:49:58,011 - ERROR - Exception traceback:
keypongbot-1 | Traceback (most recent call last):
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/__init__.py", line 1235, in __threaded_polling
keypongbot-1 | self.worker_pool.raise_exceptions()
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/util.py", line 150, in raise_exceptions
keypongbot-1 | raise self.exception_info
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/util.py", line 93, in run
keypongbot-1 | task(*args, **kwargs)
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/__init__.py", line 9040, in _run_middlewares_and_handler
keypongbot-1 | result = handler['function'](message)
keypongbot-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
keypongbot-1 | File "/app/main.py", line 49, in _handle_id
keypongbot-1 | self.reply_to(
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/__init__.py", line 5898, in reply_to
keypongbot-1 | return self.send_message(message.chat.id, text, reply_parameters=reply_parameters, **kwargs)
keypongbot-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/__init__.py", line 1780, in send_message
keypongbot-1 | apihelper.send_message(
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/apihelper.py", line 275, in send_message
keypongbot-1 | return _make_request(token, method_url, params=payload, method='post')
keypongbot-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/apihelper.py", line 168, in _make_request
keypongbot-1 | json_result = _check_result(method_name, result)
keypongbot-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
keypongbot-1 | File "/usr/local/lib/python3.12/site-packages/telebot/apihelper.py", line 195, in _check_result
keypongbot-1 | raise ApiTelegramException(method_name, result, result_json)
keypongbot-1 | telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: can't parse entities: Character '!' is reserved and must be escaped with the preceding '\'