Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
ca4f676
1
Parent(s):
ee1582d
done
Browse files- Powers/plugins/bans.py +6 -3
Powers/plugins/bans.py
CHANGED
|
@@ -81,12 +81,15 @@ async def tban_usr(c: Gojo, m: Message):
|
|
| 81 |
try:
|
| 82 |
admin = await mention_html(m.from_user.first_name, m.from_user.id)
|
| 83 |
banned = await mention_html(user_first_name, user_id)
|
| 84 |
-
chat_title = m.chat.title
|
| 85 |
LOGGER.info(f"{m.from_user.id} tbanned {user_id} in {m.chat.id}")
|
| 86 |
await m.chat.ban_member(
|
| 87 |
user_id,
|
| 88 |
until_date=bantime)
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
| 90 |
if reason:
|
| 91 |
txt += f"\n<b>Reason</b>: {reason}"
|
| 92 |
else:
|
|
@@ -285,7 +288,7 @@ async def dtban_usr(c: Gojo, m: Message):
|
|
| 285 |
try:
|
| 286 |
admin = await mention_html(m.from_user.first_name, m.from_user.id)
|
| 287 |
banned = await mention_html(user_first_name, user_id)
|
| 288 |
-
chat_title =
|
| 289 |
LOGGER.info(f"{m.from_user.id} dtbanned {user_id} in {m.chat.id}")
|
| 290 |
await m.chat.ban_member(user_id, until_date=bantime)
|
| 291 |
await m.reply_to_message.delete()
|
|
|
|
| 81 |
try:
|
| 82 |
admin = await mention_html(m.from_user.first_name, m.from_user.id)
|
| 83 |
banned = await mention_html(user_first_name, user_id)
|
| 84 |
+
chat_title = m.chat.title
|
| 85 |
LOGGER.info(f"{m.from_user.id} tbanned {user_id} in {m.chat.id}")
|
| 86 |
await m.chat.ban_member(
|
| 87 |
user_id,
|
| 88 |
until_date=bantime)
|
| 89 |
+
t_t=f"{admin} banned {banned} in <b>{chat_title}</b>!",
|
| 90 |
+
txt = t_t
|
| 91 |
+
if type(t_t) is tuple:
|
| 92 |
+
txt = t_t[0] # Done this bcuz idk why t_t is tuple type data. SO now if it is tuple this will get text from it
|
| 93 |
if reason:
|
| 94 |
txt += f"\n<b>Reason</b>: {reason}"
|
| 95 |
else:
|
|
|
|
| 288 |
try:
|
| 289 |
admin = await mention_html(m.from_user.first_name, m.from_user.id)
|
| 290 |
banned = await mention_html(user_first_name, user_id)
|
| 291 |
+
chat_title = m.chat.title
|
| 292 |
LOGGER.info(f"{m.from_user.id} dtbanned {user_id} in {m.chat.id}")
|
| 293 |
await m.chat.ban_member(user_id, until_date=bantime)
|
| 294 |
await m.reply_to_message.delete()
|