Captain Ezio commited on
Commit
b4fb3f0
·
1 Parent(s): 1652ea4

added animation

Browse files
Files changed (1) hide show
  1. Powers/plugins/muting.py +8 -4
Powers/plugins/muting.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from pyrogram.errors import (
2
  ChatAdminRequired,
3
  RightForbidden,
@@ -21,8 +22,11 @@ from Powers.utils.extract_user import extract_user
21
  from Powers.utils.parser import mention_html
22
  from Powers.utils.string import extract_time
23
  from Powers.vars import Config
 
24
 
25
 
 
 
26
  @Gojo.on_message(command("tmute") & restrict_filter)
27
  async def tmute_usr(c: Gojo, m: Message):
28
  if len(m.text.split()) == 1 and not m.reply_to_message:
@@ -103,7 +107,7 @@ async def tmute_usr(c: Gojo, m: Message):
103
  ],
104
  ],
105
  )
106
- await m.reply_text(txt, reply_markup=keyboard, reply_to_message_id=r_id)
107
  except ChatAdminRequired:
108
  await m.reply_text(text="I'm not admin or I don't have rights.")
109
  except RightForbidden:
@@ -201,7 +205,7 @@ async def dtmute_usr(c: Gojo, m: Message):
201
  ],
202
  ],
203
  )
204
- await c.send_message(m.chat.id, txt, reply_markup=keyboard)
205
  except ChatAdminRequired:
206
  await m.reply_text(text = "I'm not admin or I don't have rights.")
207
  except RightForbidden:
@@ -365,7 +369,7 @@ async def mute_usr(c: Gojo, m: Message):
365
  ],
366
  ],
367
  )
368
- await m.reply_text(txt, reply_markup=keyboard, reply_to_message_id=r_id)
369
  except ChatAdminRequired:
370
  await m.reply_text(text = "I'm not admin or I don't have rights.")
371
  except RightForbidden:
@@ -508,7 +512,7 @@ async def dmute_usr(c: Gojo, m: Message):
508
  ],
509
  ],
510
  )
511
- await c.send_message(m.chat.id, txt, reply_markup=keyboard)
512
  except ChatAdminRequired:
513
  await m.reply_text(text = "I'm not admin or I don't have rights.")
514
  except RightForbidden:
 
1
+ from random import choice
2
  from pyrogram.errors import (
3
  ChatAdminRequired,
4
  RightForbidden,
 
22
  from Powers.utils.parser import mention_html
23
  from Powers.utils.string import extract_time
24
  from Powers.vars import Config
25
+ from Powers.utils.fun_strings import MUTE_GIFS
26
 
27
 
28
+ MUTE_MEDIA = choice(MUTE_GIFS)
29
+
30
  @Gojo.on_message(command("tmute") & restrict_filter)
31
  async def tmute_usr(c: Gojo, m: Message):
32
  if len(m.text.split()) == 1 and not m.reply_to_message:
 
107
  ],
108
  ],
109
  )
110
+ await m.reply_animation(animation = MUTE_MEDIA, caption=txt, reply_markup=keyboard, reply_to_message_id=r_id)
111
  except ChatAdminRequired:
112
  await m.reply_text(text="I'm not admin or I don't have rights.")
113
  except RightForbidden:
 
205
  ],
206
  ],
207
  )
208
+ await c.send_animation(animation=MUTE_MEDIA, chat_id=m.chat.id, caption=txt, reply_markup=keyboard, unsave=True)
209
  except ChatAdminRequired:
210
  await m.reply_text(text = "I'm not admin or I don't have rights.")
211
  except RightForbidden:
 
369
  ],
370
  ],
371
  )
372
+ await m.reply_animation(animation=MUTE_MEDIA, caption=txt, reply_markup=keyboard, reply_to_message_id=r_id)
373
  except ChatAdminRequired:
374
  await m.reply_text(text = "I'm not admin or I don't have rights.")
375
  except RightForbidden:
 
512
  ],
513
  ],
514
  )
515
+ await c.send_animation(animation=MUTE_MEDIA,chat_id=m.chat.id, caption=txt, reply_markup=keyboard)
516
  except ChatAdminRequired:
517
  await m.reply_text(text = "I'm not admin or I don't have rights.")
518
  except RightForbidden: