how do i respond to messages from business_message_handler?
MatLumin opened this issue · comments
Please answer these questions before submitting your issue. Thanks!
- What version of pyTelegramBotAPI are you using?
4.17.0 - What OS are you using?
ubuntu - What version of python are you using?
3.11.9
assume i have a code like this
@bot.business_message_handler(func=lambda m:m.text=="say meow")
def say_mewo(msg):
bot.send_message(msg.chat.id, "meow");
i expect it to respond to incoming messages inside the chat its connected to by "business connection"
like this
but instead ;
it responds in its own chat with user;
how do i make it respond in business connected chat?
some extra notes:
+bot is has business mode support enabled
+the account which bot is connected to has premium subscription
+bot has the can_reply
permission
Try to get business_connection_id from Message and use it in business_connection_id of send_message...