aboutsummaryrefslogtreecommitdiff
path: root/helpers.py
diff options
context:
space:
mode:
authorhuker667 <huker@tuta.io>2026-05-29 15:49:45 +0300
committerhuker667 <huker@tuta.io>2026-05-29 15:49:45 +0300
commitdac0a6569c87e32b83fde92d32fc434f9500346a (patch)
tree1455c9c511bbc79a5587f320ab7ebcfe61c2fda8 /helpers.py
parent9e34970cf63aae3fa28f3293fbba5686e113c8fa (diff)
downloaduzbekgpt-dac0a6569c87e32b83fde92d32fc434f9500346a.tar.gz
uzbekgpt-dac0a6569c87e32b83fde92d32fc434f9500346a.tar.bz2
uzbekgpt-dac0a6569c87e32b83fde92d32fc434f9500346a.zip
da bot name da
Diffstat (limited to 'helpers.py')
-rw-r--r--helpers.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/helpers.py b/helpers.py
index f4ea3cd..4204870 100644
--- a/helpers.py
+++ b/helpers.py
@@ -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