da bot name da

This commit is contained in:
huker667 committed 2026-05-29 15:49:45 +03:00
1 parent 9e34970cf6
commit dac0a6569c
1 file changed
+8
+8
View File
@@ -33,12 +33,20 @@ def is_replied_bot(message, is_channel, user_text, config=None):
mentions_bot = any( mentions_bot = any(
user_text.lower().startswith(call.lower()) for call in BOT_CALLS 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: else:
mentions_bot = False mentions_bot = False
else: else:
mentions_bot = any( mentions_bot = any(
user_text.lower().startswith(call.lower()) for call in BOT_CALLS 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): if not (is_reply_to_bot or mentions_bot):
return False return False
return True return True