Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
ea3cfbe
1
Parent(s):
cba24af
Update admin.py
Browse files- Powers/plugins/admin.py +2 -3
Powers/plugins/admin.py
CHANGED
@@ -207,7 +207,6 @@ async def fullpromote_usr(c: Gojo, m: Message):
|
|
207 |
|
208 |
title = "" # Deafult title
|
209 |
if not m.chat.type == ChatType.SUPERGROUP:
|
210 |
-
try:
|
211 |
await m.chat.promote_member(user_id=user_id, privileges=bot.privileges)
|
212 |
|
213 |
if len(m.text.split()) == 3 and not m.reply_to_message:
|
@@ -219,8 +218,8 @@ async def fullpromote_usr(c: Gojo, m: Message):
|
|
219 |
|
220 |
try:
|
221 |
await c.set_administrator_title(m.chat.id, user_id, title)
|
222 |
-
|
223 |
-
|
224 |
|
225 |
LOGGER.info(
|
226 |
f"{m.from_user.id} fullpromoted {user_id} in {m.chat.id} with title '{title}'",
|
|
|
207 |
|
208 |
title = "" # Deafult title
|
209 |
if not m.chat.type == ChatType.SUPERGROUP:
|
|
|
210 |
await m.chat.promote_member(user_id=user_id, privileges=bot.privileges)
|
211 |
|
212 |
if len(m.text.split()) == 3 and not m.reply_to_message:
|
|
|
218 |
|
219 |
try:
|
220 |
await c.set_administrator_title(m.chat.id, user_id, title)
|
221 |
+
except RPCError as e:
|
222 |
+
LOGGER.error(e)
|
223 |
|
224 |
LOGGER.info(
|
225 |
f"{m.from_user.id} fullpromoted {user_id} in {m.chat.id} with title '{title}'",
|