Spaces:
Running
Running
Commit
·
f959059
1
Parent(s):
b7671a0
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ async def main():
|
|
45 |
if chat_id == sender_id:
|
46 |
# Check the last reply to this sender
|
47 |
last_reply_time = reply_times.get(sender_id, None)
|
48 |
-
if last_reply_time is None or time.time() - last_reply_time > 60
|
49 |
response = f'Hello {sender_name}, I received your message and will reply as soon as possible. Thank you for your understanding.'
|
50 |
await client.send_message(chat_id, response)
|
51 |
reply_times[sender_id] = time.time() # update the last reply time
|
|
|
45 |
if chat_id == sender_id:
|
46 |
# Check the last reply to this sender
|
47 |
last_reply_time = reply_times.get(sender_id, None)
|
48 |
+
if last_reply_time is None or time.time() - last_reply_time > 60: # reply only if not replied in the last minute
|
49 |
response = f'Hello {sender_name}, I received your message and will reply as soon as possible. Thank you for your understanding.'
|
50 |
await client.send_message(chat_id, response)
|
51 |
reply_times[sender_id] = time.time() # update the last reply time
|