Update app.py
Browse files
app.py
CHANGED
|
@@ -91,8 +91,8 @@ 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> ๐๐ป ,\n {random.choice(RndMssgs)} ๐'
|
| 95 |
-
|
| 96 |
await client.send_message(chat_id, response, parse_mode='HTML',link_preview=False)
|
| 97 |
reply_times[str(sender_id)] = time.time() # update the last reply time
|
| 98 |
|
|
@@ -100,8 +100,8 @@ async def main():
|
|
| 100 |
elif username in text:
|
| 101 |
last_reply_time = reply_times.get(str(str(chat_id)+str(sender_id)), None)
|
| 102 |
if last_reply_time is None or time.time() - last_reply_time > 60*5:
|
| 103 |
-
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)} ๐'
|
| 104 |
-
|
| 105 |
await client.send_message(chat_id, response, parse_mode='HTML',link_preview=False)
|
| 106 |
reply_times[str(str(chat_id)+str(sender_id))] = time.time()
|
| 107 |
|
|
@@ -114,4 +114,4 @@ inputs = []
|
|
| 114 |
output = "text"
|
| 115 |
gr.Interface(fn=main, inputs=inputs, outputs=output).launch()
|
| 116 |
|
| 117 |
-
|
|
|
|
| 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 |
+
response = f'ุฃููุง <a href="tg://user?id={sender_id}">{sender_name}</a> ๐๐ป ,\nุงูุญุณุงุจ ู
ุบูู ุญุงููุงู. \n ุงูุฑุณุงุฆู ุงููุงู
ุฉ ุนุจุฑ <a href="https://www.facebook.com/MohammedAlakras/">Messenger</a> \n \n ุดูุฑุงู ูุชููู
ู '
|
| 96 |
await client.send_message(chat_id, response, parse_mode='HTML',link_preview=False)
|
| 97 |
reply_times[str(sender_id)] = time.time() # update the last reply time
|
| 98 |
|
|
|
|
| 100 |
elif username in text:
|
| 101 |
last_reply_time = reply_times.get(str(str(chat_id)+str(sender_id)), None)
|
| 102 |
if last_reply_time is None or time.time() - last_reply_time > 60*5:
|
| 103 |
+
#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)} ๐'
|
| 104 |
+
response = f'ุฃููุง <a href="tg://user?id={sender_id}">{sender_name}</a> ๐๐ป ,\nุงูุญุณุงุจ ู
ุบูู ุญุงููุงู. \n ุงูุฑุณุงุฆู ุงููุงู
ุฉ ุนุจุฑ <a href="https://www.facebook.com/MohammedAlakras/">Messenger</a> \n \n ุดูุฑุงู ูุชููู
ู '
|
| 105 |
await client.send_message(chat_id, response, parse_mode='HTML',link_preview=False)
|
| 106 |
reply_times[str(str(chat_id)+str(sender_id))] = time.time()
|
| 107 |
|
|
|
|
| 114 |
output = "text"
|
| 115 |
gr.Interface(fn=main, inputs=inputs, outputs=output).launch()
|
| 116 |
|
| 117 |
+
# client.loop.run_until_complete(main())
|