randydev commited on
Commit
a835529
·
verified ·
1 Parent(s): c14f993

update fix

Browse files
Files changed (1) hide show
  1. akn/AllDownloaderBot/admins.py +4 -6
akn/AllDownloaderBot/admins.py CHANGED
@@ -299,10 +299,9 @@ async def arz_mute_all(client: Client, message: Message):
299
  return await message.reply_text("This command is not available in private chats.")
300
  if message.chat.type == ChatType.SUPERGROUP:
301
  try:
302
- await client.restrict_chat_member(
303
  message.chat.id,
304
- client.me.id,
305
- permissions=ChatPermissions(),
306
  )
307
  await message.reply_text("All members muted successfully.")
308
  except Exception as e:
@@ -321,10 +320,9 @@ async def arz_unmute_all(client: Client, message: Message):
321
  return await message.reply_text("This command is not available in private chats.")
322
  if message.chat.type == ChatType.SUPERGROUP:
323
  try:
324
- await client.restrict_chat_member(
325
  message.chat.id,
326
- client.me.id,
327
- permissions=unmute_permissions,
328
  )
329
  await message.reply_text("All members unmuted successfully.")
330
  except Exception as e:
 
299
  return await message.reply_text("This command is not available in private chats.")
300
  if message.chat.type == ChatType.SUPERGROUP:
301
  try:
302
+ await client.set_chat_permissions(
303
  message.chat.id,
304
+ permissions=ChatPermissions()
 
305
  )
306
  await message.reply_text("All members muted successfully.")
307
  except Exception as e:
 
320
  return await message.reply_text("This command is not available in private chats.")
321
  if message.chat.type == ChatType.SUPERGROUP:
322
  try:
323
+ await client.set_chat_permissions(
324
  message.chat.id,
325
+ permissions=unmute_permissions
 
326
  )
327
  await message.reply_text("All members unmuted successfully.")
328
  except Exception as e: