randydev commited on
Commit
f637191
·
verified ·
1 Parent(s): 1d0a11d
Files changed (1) hide show
  1. akn/AllDownloaderBot/main.py +7 -7
akn/AllDownloaderBot/main.py CHANGED
@@ -62,7 +62,7 @@ async def cb_cclose(client, query):
62
  @Client.on_callback_query(filters.regex("^author_cmd"))
63
  async def cb_author_command(client, query):
64
  is_sudo = await db.get_alldlbot_sudouser(client.me.id, query.from_user.id)
65
- protect_own = await db.get_alldlbot_by_user_id(query.from_user.id)
66
  if not protect_own and not is_sudo:
67
  return await query.answer("You are not allowed here.", True)
68
 
@@ -214,7 +214,7 @@ async def callback_button(client: Client, cb: CallbackQuery):
214
  )
215
  async def statscmd(c, m):
216
  is_sudo = await db.get_alldlbot_sudouser(c.me.id, m.from_user.id)
217
- protect_own = await db.get_alldlbot_by_user_id(m.from_user.id)
218
  if not protect_own and not is_sudo:
219
  return await m.reply_text("You are not allowed here.")
220
  try:
@@ -234,7 +234,7 @@ async def statscmd(c, m):
234
  )
235
  async def delpicincatbox(c, m):
236
  is_sudo = await db.get_alldlbot_sudouser(c.me.id, m.from_user.id)
237
- protect_own = await db.get_alldlbot_by_user_id(m.from_user.id)
238
  if not protect_own and not is_sudo:
239
  return await m.reply_text("You are not allowed here.")
240
  mode = m.text.split(" ", 1)[1] if len(m.command) > 1 else None
@@ -259,7 +259,7 @@ async def delpicincatbox(c, m):
259
  )
260
  async def setpicincatbox(c, m):
261
  is_sudo = await db.get_alldlbot_sudouser(c.me.id, m.from_user.id)
262
- protect_own = await db.get_alldlbot_by_user_id(m.from_user.id)
263
  if not protect_own and not is_sudo:
264
  return await m.reply_text("You are not allowed here.")
265
  link = m.text.split(" ", 1)[1] if len(m.command) > 1 else None
@@ -280,7 +280,7 @@ async def setpicincatbox(c, m):
280
  )
281
  async def duplicate_remove(c, m):
282
  is_sudo = await db.get_alldlbot_sudouser(c.me.id, m.from_user.id)
283
- protect_own = await db.get_alldlbot_by_user_id(m.from_user.id)
284
  if not protect_own and not is_sudo:
285
  return await m.reply_text("You are not allowed here.")
286
  if m.chat.type.value != "supergroup":
@@ -311,7 +311,7 @@ async def duplicate_remove(c, m):
311
  & ~filters.forwarded
312
  )
313
  async def auto_force_sub(client: Client, message: Message):
314
- protect_own = await db.get_alldlbot_by_user_id(message.from_user.id)
315
  if not protect_own:
316
  return await message.reply_text("You are not allowed to add a force sub.")
317
 
@@ -329,7 +329,7 @@ async def auto_force_sub(client: Client, message: Message):
329
  )
330
  async def mode_button(client, message: Message):
331
  is_sudo = await db.get_alldlbot_sudouser(client.me.id, message.from_user.id)
332
- protect_own = await db.get_alldlbot_by_user_id(message.from_user.id)
333
  if not protect_own and not is_sudo:
334
  return await m.reply_text("You are not allowed here.") # type: ignore
335
 
 
62
  @Client.on_callback_query(filters.regex("^author_cmd"))
63
  async def cb_author_command(client, query):
64
  is_sudo = await db.get_alldlbot_sudouser(client.me.id, query.from_user.id)
65
+ protect_own = await db.get_alldlbot_by_user_id(query.from_user.id, client.me.id)
66
  if not protect_own and not is_sudo:
67
  return await query.answer("You are not allowed here.", True)
68
 
 
214
  )
215
  async def statscmd(c, m):
216
  is_sudo = await db.get_alldlbot_sudouser(c.me.id, m.from_user.id)
217
+ protect_own = await db.get_alldlbot_by_user_id(m.from_user.id, c.me.id)
218
  if not protect_own and not is_sudo:
219
  return await m.reply_text("You are not allowed here.")
220
  try:
 
234
  )
235
  async def delpicincatbox(c, m):
236
  is_sudo = await db.get_alldlbot_sudouser(c.me.id, m.from_user.id)
237
+ protect_own = await db.get_alldlbot_by_user_id(m.from_user.id, c.me.id)
238
  if not protect_own and not is_sudo:
239
  return await m.reply_text("You are not allowed here.")
240
  mode = m.text.split(" ", 1)[1] if len(m.command) > 1 else None
 
259
  )
260
  async def setpicincatbox(c, m):
261
  is_sudo = await db.get_alldlbot_sudouser(c.me.id, m.from_user.id)
262
+ protect_own = await db.get_alldlbot_by_user_id(m.from_user.id, c.me.id)
263
  if not protect_own and not is_sudo:
264
  return await m.reply_text("You are not allowed here.")
265
  link = m.text.split(" ", 1)[1] if len(m.command) > 1 else None
 
280
  )
281
  async def duplicate_remove(c, m):
282
  is_sudo = await db.get_alldlbot_sudouser(c.me.id, m.from_user.id)
283
+ protect_own = await db.get_alldlbot_by_user_id(m.from_user.id, c.me.id)
284
  if not protect_own and not is_sudo:
285
  return await m.reply_text("You are not allowed here.")
286
  if m.chat.type.value != "supergroup":
 
311
  & ~filters.forwarded
312
  )
313
  async def auto_force_sub(client: Client, message: Message):
314
+ protect_own = await db.get_alldlbot_by_user_id(message.from_user.id, client.me.id)
315
  if not protect_own:
316
  return await message.reply_text("You are not allowed to add a force sub.")
317
 
 
329
  )
330
  async def mode_button(client, message: Message):
331
  is_sudo = await db.get_alldlbot_sudouser(client.me.id, message.from_user.id)
332
+ protect_own = await db.get_alldlbot_by_user_id(message.from_user.id, client.me.id)
333
  if not protect_own and not is_sudo:
334
  return await m.reply_text("You are not allowed here.") # type: ignore
335