Captain Ezio commited on
Commit
78c0c28
·
1 Parent(s): af45fef

Update admin.py

Browse files
Files changed (1) hide show
  1. Powers/plugins/admin.py +4 -2
Powers/plugins/admin.py CHANGED
@@ -183,6 +183,7 @@ async def fullpromote_usr(c: Gojo, m: Message):
183
  return
184
  try:
185
  await m.chat.promote_member(user_id=user_id, privileges=bot.privileges)
 
186
  if not m.chat.type == ChatType.SUPERGROUP:
187
  title = "Gojo" # Default fullpromote title
188
  if len(m.text.split()) == 3 and not m.reply_to_message:
@@ -207,7 +208,7 @@ async def fullpromote_usr(c: Gojo, m: Message):
207
  promoted=(await mention_html(user_first_name, user_id)),
208
  chat_title=f"{escape(m.chat.title)} title set to {title}"
209
  if title
210
- else f"{escape(m.chat.title)} title set to Gojo",
211
  ),
212
  )
213
  # If user is approved, disapprove them as they willbe promoted and get
@@ -284,6 +285,7 @@ async def promote_usr(c: Gojo, m: Message):
284
  can_manage_video_chats=bot.privileges.can_manage_video_chats,
285
  ),
286
  )
 
287
  if not m.chat.type == ChatType.SUPERGROUP:
288
  title = "Itadori" # Deafult title
289
  if len(m.text.split()) == 3 and not m.reply_to_message:
@@ -306,7 +308,7 @@ async def promote_usr(c: Gojo, m: Message):
306
  promoted=(await mention_html(user_first_name, user_id)),
307
  chat_title=f"{escape(m.chat.title)} title set to {title}"
308
  if title
309
- else f"{escape(m.chat.title)} title set to Itadori",
310
  ),
311
  )
312
  # If user is approved, disapprove them as they willbe promoted and get
 
183
  return
184
  try:
185
  await m.chat.promote_member(user_id=user_id, privileges=bot.privileges)
186
+ title = ""
187
  if not m.chat.type == ChatType.SUPERGROUP:
188
  title = "Gojo" # Default fullpromote title
189
  if len(m.text.split()) == 3 and not m.reply_to_message:
 
208
  promoted=(await mention_html(user_first_name, user_id)),
209
  chat_title=f"{escape(m.chat.title)} title set to {title}"
210
  if title
211
+ else f"{escape(m.chat.title)} title set to Default",
212
  ),
213
  )
214
  # If user is approved, disapprove them as they willbe promoted and get
 
285
  can_manage_video_chats=bot.privileges.can_manage_video_chats,
286
  ),
287
  )
288
+ title = ""
289
  if not m.chat.type == ChatType.SUPERGROUP:
290
  title = "Itadori" # Deafult title
291
  if len(m.text.split()) == 3 and not m.reply_to_message:
 
308
  promoted=(await mention_html(user_first_name, user_id)),
309
  chat_title=f"{escape(m.chat.title)} title set to {title}"
310
  if title
311
+ else f"{escape(m.chat.title)} title set to default",
312
  ),
313
  )
314
  # If user is approved, disapprove them as they willbe promoted and get