Answer the question
In order to leave comments, you need to log in
How to pass entities to telebot?
The official api https://core.telegram.org/bots/api#sendmessage has the entities parameter, but when I pass it to telebot I get an error:
TypeError: send_message() got an unexpected keyword argument 'entities'
import telebot
bot = telebot.TeleBot(token)
@bot.message_handler(content_types = ['text', 'audio', 'document', 'photo'])
def messages(message):
bot.send_message(message.chat.id, text=message.text, entities = message.entities)
bot.polling(none_stop = True, timeout=123)
Answer the question
In order to leave comments, you need to log in
You are not looking there. The telebot library is just a connecting part between the Telegram Bot API and python. There is no entities parameter
in the
bot.send_message method , you can follow the link and see what happens "under the hood".
Perhaps the aiogram library has the necessary functionality.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question