Всем привет! Не понимаю почему вылазит ошибка когда я ввожу команду start. Ниже прилогаю код. Суть проблемы в том что я хочу использовать несколько переменных в одном сообщении, пока что выкручиваюсь тем что отправляю переменные разными сообщениями.
import telebot
a = '1'
b = '2'
bot = telebot.TeleBot('TOKEN')
@bot.message_handler(commands=['start'])
def start_command(message):
bot.send_message(
message.chat.id,
a,b)
bot.polling( non_stop = True)
Вот текст ошибки:
2023-02-09 18:49:36,163 (__init__.py:1083 MainThread) ERROR - TeleBot: "Threaded polling exception: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: unsupported parse_mode"
2023-02-09 18:49:36,203 (__init__.py:1085 MainThread) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):
File "C:\Users\Nazar\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\__init__.py", line 1074, in __threaded_polling
self.worker_pool.raise_exceptions()
File "C:\Users\Nazar\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\util.py", line 148, in raise_exceptions
raise self.exception_info
File "C:\Users\Nazar\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\util.py", line 91, in run
task(*args, **kwargs)
File "C:\Users\Nazar\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\__init__.py", line 6428, in _run_middlewares_and_handler
result = handler['function'](message)
File "D:\python\test2.py", line 10, in start_command
bot.send_message(
File "C:\Users\Nazar\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\__init__.py", line 1549, in send_message
apihelper.send_message(
File "C:\Users\Nazar\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\apihelper.py", line 264, in send_message
return _make_request(token, method_url, params=payload, method='post')
File "C:\Users\Nazar\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\apihelper.py", line 162, in _make_request
json_result = _check_result(method_name, result)
File "C:\Users\Nazar\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\apihelper.py", line 189, in _check_result
raise ApiTelegramException(method_name, result, result_json)
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: unsupported parse_mode
"