randydev commited on
Commit
29efbc6
·
verified ·
1 Parent(s): 529e5da

Update Akeno/plugins/leaveallmute.py

Browse files
Files changed (1) hide show
  1. Akeno/plugins/leaveallmute.py +12 -8
Akeno/plugins/leaveallmute.py CHANGED
@@ -9,6 +9,7 @@ from Akeno.utils.handler import *
9
  from config import *
10
 
11
  custom_boost = "<emoji id=5812442283206775108>🗿</emoji>"
 
12
 
13
  @Akeno(
14
  ~filters.scheduled
@@ -20,7 +21,10 @@ async def leaveallmute(client: Client, message: Message):
20
  leave = 0
21
  failed = 0
22
  try:
23
- pro = await message.reply_text("Wait prossing.....")
 
 
 
24
  async for dialog in client.get_dialogs():
25
  chat_id = dialog.chat.id if dialog.chat else 0
26
  chat_title = dialog.chat.title if dialog.chat else ""
@@ -35,9 +39,9 @@ async def leaveallmute(client: Client, message: Message):
35
  except Exception as e:
36
  failed += 1
37
  if client.me.is_premium:
38
- await pro.edit_text(f"{custom_boost}Successfully leave {leave} from group")
39
  else:
40
- await pro.edit_text(f"Successfully leave {leave} from group")
41
  except MessageNotModified:
42
  pass
43
  except Exception as e:
@@ -51,10 +55,12 @@ async def leaveallmute(client: Client, message: Message):
51
  )
52
  async def listmuted(client: Client, message: Message):
53
  leave = 0
54
- failed = 0
55
- u = "Nothing found\n"
56
  try:
57
- pro = await message.reply_text("Wait prossing.....")
 
 
 
58
  async for dialog in client.get_dialogs():
59
  chat_id = dialog.chat.id if dialog.chat else 0
60
  chat_title = dialog.chat.title if dialog.chat else ""
@@ -68,10 +74,8 @@ async def listmuted(client: Client, message: Message):
68
  continue
69
  except Exception as e:
70
  u += str(e) + "\n"
71
- failed += 1
72
  formatting = (
73
  f"{u}\n"
74
- f"Failed: {failed}\n"
75
  )
76
  await pro.edit_text(formatting)
77
  except MessageNotModified:
 
9
  from config import *
10
 
11
  custom_boost = "<emoji id=5812442283206775108>🗿</emoji>"
12
+ custom_petir = "<emoji id=5456140674028019486>🗿</emoji>"
13
 
14
  @Akeno(
15
  ~filters.scheduled
 
21
  leave = 0
22
  failed = 0
23
  try:
24
+ if client.me.is_premium:
25
+ pro = await message.reply_text(f"{custom_petir}Wait prossing.....")
26
+ else:
27
+ pro = await message.reply_text(f"Wait prossing.....")
28
  async for dialog in client.get_dialogs():
29
  chat_id = dialog.chat.id if dialog.chat else 0
30
  chat_title = dialog.chat.title if dialog.chat else ""
 
39
  except Exception as e:
40
  failed += 1
41
  if client.me.is_premium:
42
+ await pro.edit_text(f"{custom_boost}Successfully leave {leave} from group\nFailed group: {failed}")
43
  else:
44
+ await pro.edit_text(f"Successfully leave {leave} from group\nFailed group: {failed}")
45
  except MessageNotModified:
46
  pass
47
  except Exception as e:
 
55
  )
56
  async def listmuted(client: Client, message: Message):
57
  leave = 0
58
+ u = "Nothing found\n\n"
 
59
  try:
60
+ if client.me.is_premium:
61
+ pro = await message.reply_text(f"{custom_petir}Wait prossing.....")
62
+ else:
63
+ pro = await message.reply_text(f"Wait prossing.....")
64
  async for dialog in client.get_dialogs():
65
  chat_id = dialog.chat.id if dialog.chat else 0
66
  chat_title = dialog.chat.title if dialog.chat else ""
 
74
  continue
75
  except Exception as e:
76
  u += str(e) + "\n"
 
77
  formatting = (
78
  f"{u}\n"
 
79
  )
80
  await pro.edit_text(formatting)
81
  except MessageNotModified: