Let's take a look at this piece of code:
def bot_func(update, context):
update.message.reply_text(text='chunk',
parse_mode='HTML')
context.bot.send_message(chat_id=update.message.from_user.id,
text='chunk',
parse_mode='HTML')
The first method will reply in current chat and simply accept the chat_id
as is, regardless whether the chat_id
belongs to a private chat or a group chat:
update.message.reply_text(text='chunk',
parse_mode='HTML')
Force Reply as a private chat
The second method will force reply as a private chat, as the message is directy send to the user specified in update.message.from_user.id
:
context.bot.send_message(chat_id=update.message.from_user.id,
text='chunk',
parse_mode='HTML')