Commit
Β·
46a7d90
1
Parent(s):
5abede8
Update app.py
Browse files
app.py
CHANGED
|
@@ -91,7 +91,7 @@ async def main():
|
|
| 91 |
# Check the last reply to this sender
|
| 92 |
last_reply_time = reply_times.get(str(sender_id), None)
|
| 93 |
if last_reply_time is None or time.time() - last_reply_time > 60*60*6: # reply only if not replied in the last minute
|
| 94 |
-
response = f'Hello <a href="tg://user?id={sender_id}">{sender_name}</a
|
| 95 |
await client.send_message(chat_id, response, parse_mode='HTML')
|
| 96 |
reply_times[str(sender_id)] = time.time() # update the last reply time
|
| 97 |
|
|
@@ -99,7 +99,7 @@ async def main():
|
|
| 99 |
elif username in text:
|
| 100 |
last_reply_time = reply_times.get(str(str(chat_id)+str(sender_id)), None)
|
| 101 |
if last_reply_time is None or time.time() - last_reply_time > 60*5:
|
| 102 |
-
response = f'Hello <a href="tg://user?id={sender_id}">{sender_name}</a> @ <a href="https://t.me/c/{chat_id}">{chat.title}</a
|
| 103 |
await client.send_message(chat_id, response, parse_mode='HTML')
|
| 104 |
reply_times[str(str(chat_id)+str(sender_id))] = time.time()
|
| 105 |
|
|
|
|
| 91 |
# Check the last reply to this sender
|
| 92 |
last_reply_time = reply_times.get(str(sender_id), None)
|
| 93 |
if last_reply_time is None or time.time() - last_reply_time > 60*60*6: # reply only if not replied in the last minute
|
| 94 |
+
response = f'Hello <a href="tg://user?id={sender_id}">{sender_name}</a> ππ» ,\n {random.choice(RndMssgs)} π'
|
| 95 |
await client.send_message(chat_id, response, parse_mode='HTML')
|
| 96 |
reply_times[str(sender_id)] = time.time() # update the last reply time
|
| 97 |
|
|
|
|
| 99 |
elif username in text:
|
| 100 |
last_reply_time = reply_times.get(str(str(chat_id)+str(sender_id)), None)
|
| 101 |
if last_reply_time is None or time.time() - last_reply_time > 60*5:
|
| 102 |
+
response = f'Hello <a href="tg://user?id={sender_id}">{sender_name}</a> @ <a href="https://t.me/c/{chat_id}">{chat.title}</a> ππ»,\n {random.choice(RndMssgs)} π'
|
| 103 |
await client.send_message(chat_id, response, parse_mode='HTML')
|
| 104 |
reply_times[str(str(chat_id)+str(sender_id))] = time.time()
|
| 105 |
|