Skip to content

how to make the bot reply to quotes in a group? #98

Answered by n3d1117
kamil-malinski asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @kamil-malinski! Good idea, it should be enough to replace these lines:

logging.warning('Message does not start with trigger keyword, ignoring...')
return

with:

if update.message.reply_to_message and update.message.reply_to_message.from_user.id == context.bot.id:
    logging.info('Message is a reply to the bot, allowing...')
else:
    logging.warning('Message does not start with trigger keyword, ignoring...')
    return

Let me know if it works and i'll merge this!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kamil-malinski
Comment options

Answer selected by n3d1117
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