Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
165d5ec
1
Parent(s):
0006686
Works in channel only
Browse files- Powers/plugins/admin.py +1 -26
Powers/plugins/admin.py
CHANGED
@@ -460,31 +460,6 @@ async def setgtitle(_, m: Message):
|
|
460 |
f"Successfully Changed Group Title From {m.chat.title} To {gtit}",
|
461 |
)
|
462 |
|
463 |
-
"""@Gojo.on_message(command("contents") & admin_filter)
|
464 |
-
async def savecontent(c: Gojo, m: Message):
|
465 |
-
user = await m.chat.get_member(m.from_user.id)
|
466 |
-
if not (user.privileges.can_restrict_members and user.status in [CMS.OWNER, CMS.ADMINISTRATOR]):
|
467 |
-
await m.reply_text(
|
468 |
-
"You can't restrict contents here!"
|
469 |
-
)
|
470 |
-
return
|
471 |
-
if len(m.command) < 1:
|
472 |
-
return await m.reply_text("Please read /help for using it!")
|
473 |
-
todo = m.text.split(None, 1)[1]
|
474 |
-
try:
|
475 |
-
c.set_chat_protected_content()
|
476 |
-
if todo.lower() in ["yes", "true", "on"]:
|
477 |
-
await m.chat.set_protected_content(True)
|
478 |
-
return await m.reply_text("Now no one can save content from this chat!")
|
479 |
-
if todo.lower() in ["no", "false", "off"]:
|
480 |
-
await m.chat.set_protected_content(False)
|
481 |
-
return await m.reply_text("Now peoples can save content from this chat!")
|
482 |
-
return await m.reply_text("**Usage:** `/contents` <yes/on/true> or <off/false/no>\n Do /help admin to know more.")
|
483 |
-
except Exception as e:
|
484 |
-
LOGGER.error(e)
|
485 |
-
LOGGER.error(format_exc())
|
486 |
-
return await m.reply_text(f"**Error:**\n{e}")"""
|
487 |
-
|
488 |
@Gojo.on_message(command("setgdes") & admin_filter)
|
489 |
async def setgdes(_, m: Message):
|
490 |
user = await m.chat.get_member(m.from_user.id)
|
@@ -601,4 +576,4 @@ __HELP__ = """
|
|
601 |
**Example:**
|
602 |
`/promote @username`: this promotes a user to admin."""
|
603 |
|
604 |
-
|
|
|
460 |
f"Successfully Changed Group Title From {m.chat.title} To {gtit}",
|
461 |
)
|
462 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
463 |
@Gojo.on_message(command("setgdes") & admin_filter)
|
464 |
async def setgdes(_, m: Message):
|
465 |
user = await m.chat.get_member(m.from_user.id)
|
|
|
576 |
**Example:**
|
577 |
`/promote @username`: this promotes a user to admin."""
|
578 |
|
579 |
+
|