MohammedAlakhras commited on
Commit
ac666ca
·
1 Parent(s): 82701a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,7 +41,7 @@ async def main():
41
  # Check the last reply to this sender
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: # reply only if not replied in the last minute
44
- response = f'Hello {sender_name}, 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
 
@@ -49,7 +49,7 @@ async def main():
49
  elif '@Mohammed_Alakhras' in text:
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 {sender_name}@{chat.title}, 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
 
 
41
  # Check the last reply to this sender
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: # reply only if not replied in the last minute
44
+ response = f'Hello {sender_name},\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
 
 
49
  elif '@Mohammed_Alakhras' in text:
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 {sender_name} @{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