Spaces:
Running
Running
Commit
·
31e25aa
1
Parent(s):
4f9c90e
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ async def main():
|
|
42 |
last_reply_time = reply_times.get(str(sender_id), None)
|
43 |
if last_reply_time is None or time.time() - last_reply_time > 60*60*6: # reply only if not replied in the last minute
|
44 |
response = f'Hello <a href="tg://user?id={sender_id}">{sender_name}</a>,\n I received your message and will reply as soon as possible. Thank you for your understanding.'
|
45 |
-
await client.send_message(chat_id, response)
|
46 |
reply_times[str(sender_id)] = time.time() # update the last reply time
|
47 |
|
48 |
# Group message
|
@@ -50,7 +50,7 @@ async def main():
|
|
50 |
last_reply_time = reply_times.get(str(str(chat_id)+str(sender_id)), None)
|
51 |
if last_reply_time is None or time.time() - last_reply_time > 60*5:
|
52 |
response = f'Hello <a href="tg://user?id={sender_id}">{sender_name}</a> @ {chat.title},\n I received your message and will reply as soon as possible. Thank you for your understanding.'
|
53 |
-
await client.send_message(chat_id, response)
|
54 |
reply_times[str(str(chat_id)+str(sender_id))] = time.time()
|
55 |
|
56 |
|
|
|
42 |
last_reply_time = reply_times.get(str(sender_id), None)
|
43 |
if last_reply_time is None or time.time() - last_reply_time > 60*60*6: # reply only if not replied in the last minute
|
44 |
response = f'Hello <a href="tg://user?id={sender_id}">{sender_name}</a>,\n I received your message and will reply as soon as possible. Thank you for your understanding.'
|
45 |
+
await client.send_message(chat_id, response, parse_mode='HTML')
|
46 |
reply_times[str(sender_id)] = time.time() # update the last reply time
|
47 |
|
48 |
# Group message
|
|
|
50 |
last_reply_time = reply_times.get(str(str(chat_id)+str(sender_id)), None)
|
51 |
if last_reply_time is None or time.time() - last_reply_time > 60*5:
|
52 |
response = f'Hello <a href="tg://user?id={sender_id}">{sender_name}</a> @ {chat.title},\n I received your message and will reply as soon as possible. Thank you for your understanding.'
|
53 |
+
await client.send_message(chat_id, response, parse_mode='HTML')
|
54 |
reply_times[str(str(chat_id)+str(sender_id))] = time.time()
|
55 |
|
56 |
|