sahanind commited on
Commit
7a79bab
·
verified ·
1 Parent(s): c26fe80

Update plugins/echo.py

Browse files
Files changed (1) hide show
  1. plugins/echo.py +21 -21
plugins/echo.py CHANGED
@@ -103,28 +103,28 @@ async def echo(bot, update):
103
  disable_web_page_preview=True,
104
  reply_to_message_id=update.id,
105
  )
106
- if update.from_user.id not in Config.AUTH_USERS:
107
 
108
- if str(update.from_user.id) in Config.ADL_BOT_RQ:
109
- current_time = time.time()
110
- previous_time = Config.ADL_BOT_RQ[str(update.from_user.id)]
111
- process_max_timeout = round(Config.PROCESS_MAX_TIMEOUT / 60)
112
- present_time = round(
113
- Config.PROCESS_MAX_TIMEOUT - (current_time - previous_time)
114
- )
115
- Config.ADL_BOT_RQ[str(update.from_user.id)] = time.time()
116
- if round(current_time - previous_time) < Config.PROCESS_MAX_TIMEOUT:
117
- await bot.edit_message_text(
118
- chat_id=update.chat.id,
119
- text=Translation.FREE_USER_LIMIT_Q_SZE.format(
120
- process_max_timeout, present_time
121
- ),
122
- disable_web_page_preview=True,
123
- message_id=chk.id,
124
- )
125
- return
126
- else:
127
- Config.ADL_BOT_RQ[str(update.from_user.id)] = time.time()
128
 
129
  process = await asyncio.create_subprocess_exec(
130
  *command_to_exec,
 
103
  disable_web_page_preview=True,
104
  reply_to_message_id=update.id,
105
  )
106
+ # if update.from_user.id not in Config.AUTH_USERS:
107
 
108
+ # if str(update.from_user.id) in Config.ADL_BOT_RQ:
109
+ # current_time = time.time()
110
+ # previous_time = Config.ADL_BOT_RQ[str(update.from_user.id)]
111
+ # process_max_timeout = round(Config.PROCESS_MAX_TIMEOUT / 60)
112
+ # present_time = round(
113
+ # Config.PROCESS_MAX_TIMEOUT - (current_time - previous_time)
114
+ # )
115
+ # Config.ADL_BOT_RQ[str(update.from_user.id)] = time.time()
116
+ # if round(current_time - previous_time) < Config.PROCESS_MAX_TIMEOUT:
117
+ # await bot.edit_message_text(
118
+ # chat_id=update.chat.id,
119
+ # text=Translation.FREE_USER_LIMIT_Q_SZE.format(
120
+ # process_max_timeout, present_time
121
+ # ),
122
+ # disable_web_page_preview=True,
123
+ # message_id=chk.id,
124
+ # )
125
+ # return
126
+ # else:
127
+ # Config.ADL_BOT_RQ[str(update.from_user.id)] = time.time()
128
 
129
  process = await asyncio.create_subprocess_exec(
130
  *command_to_exec,