Skip to content

Trying to reply manually for some users reply #3843

Answered by harshil21
hkpmatt asked this question in Q&A
Discussion options

You must be logged in to vote

You can for e.g. attach the user's id to the support message, and then while you reply to it, retrieve the replied message using update.effective_message.reply_to_message and parse that to get the original user's id. This way you don't need to store anything. e.g:

"""
From (<username|name> - <user_id>): Hi i have this problem with the bot...

> From (<username|name> - <user_id>): Hi i have this problem with the bot...

Hi do this...
org_msg = update.effective_message.reply_to_message
user_id = parsing code here
await context.bot.send_message(user_id, update.effective_message.text)

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@hkpmatt
Comment options

@harshil21
Comment options

@hkpmatt
Comment options

Answer selected by hkpmatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants