how to make the bot reply to quotes in a group? #98
-
Hi! I have disabled privacy mode and put "@botName" to "GROUP_TRIGGER_KEYWORD". This works as intended: the bot only replies to messages starting with "@botName". Additionally I would like the bot to reply to replies to its own messages (when somebody quotes the bot's message). How can I achieve that? Thanks! Cheers Kamil |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @kamil-malinski! Good idea, it should be enough to replace these lines: chatgpt-telegram-bot/bot/telegram_bot.py Lines 298 to 299 in 7e6720f 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! |
Beta Was this translation helpful? Give feedback.
Hi @kamil-malinski! Good idea, it should be enough to replace these lines:
chatgpt-telegram-bot/bot/telegram_bot.py
Lines 298 to 299 in 7e6720f
with:
Let me know if it works and i'll merge this!