I am trying to make a simple tg bot in python using django and pyTelegramBotApi, which is answering "Hello" on a /start. I've set webhook, and bot is getting updates correctly, but when it comes to send_message it just goes trough and sends nothing.
@csrf_exempt
def update_bot(request):
json_str = request.body.decode("UTF-8")
update = types.Update.de_json(json_str)
tele_bot.process_new_updates([update])
return HttpResponse({'code': 200})
@tele_bot.message_handler(commands=['start'])
def start_message(message):
print("sending message")
print(tele_bot.send_message(message.chat.id, "Hello"))
And the console output is
sending message
[24/Dec/2020 10:54:46] "POST /bot/imagesmanager/ HTTP/1.1" 200 4