diff options
| author | huker667 <huker@tuta.io> | 2026-05-29 15:49:45 +0300 |
|---|---|---|
| committer | huker667 <huker@tuta.io> | 2026-05-29 15:49:45 +0300 |
| commit | dac0a6569c87e32b83fde92d32fc434f9500346a (patch) | |
| tree | 1455c9c511bbc79a5587f320ab7ebcfe61c2fda8 /helpers.py | |
| parent | 9e34970cf63aae3fa28f3293fbba5686e113c8fa (diff) | |
| download | uzbekgpt-dac0a6569c87e32b83fde92d32fc434f9500346a.tar.gz uzbekgpt-dac0a6569c87e32b83fde92d32fc434f9500346a.tar.bz2 uzbekgpt-dac0a6569c87e32b83fde92d32fc434f9500346a.zip | |
da bot name da
Diffstat (limited to 'helpers.py')
| -rw-r--r-- | helpers.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -33,12 +33,20 @@ def is_replied_bot(message, is_channel, user_text, config=None): mentions_bot = any( user_text.lower().startswith(call.lower()) for call in BOT_CALLS ) + for call in BOT_CALLS: + if call.startswith("@"): + if call.lower() in user_text.lower(): + mentions_bot = True else: mentions_bot = False else: mentions_bot = any( user_text.lower().startswith(call.lower()) for call in BOT_CALLS ) + for call in BOT_CALLS: + if call.startswith("@"): + if call.lower() in user_text.lower(): + mentions_bot = True if not (is_reply_to_bot or mentions_bot): return False return True |