This commit is contained in:
levina 2021-11-03 20:15:17 +07:00 committed by GitHub
parent 6d77f24a0d
commit 9450b48586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,12 +69,12 @@ async def play(c: Client, m: Message):
a = await c.get_chat_member(chat_id, aing.id) a = await c.get_chat_member(chat_id, aing.id)
if a.status != "administrator": if a.status != "administrator":
await m.reply_text( await m.reply_text(
f"💡 To use me, I need to be an **Administrator** with the following **permissions**:\n\n» ❌ __Delete messages__\n» ❌ __Ban users__\n» ❌ __Add users__\n» ❌ __Manage voice chat__\n\nData is **updated** automatically after you **promote me**" f"💡 To use me, I need to be an **Administrator** with the following **permissions**:\n\n» ❌ __Delete messages__\n» ❌ __Restrict users__\n» ❌ __Add users__\n» ❌ __Manage video chat__\n\nData is **updated** automatically after you **promote me**"
) )
return return
if not a.can_manage_voice_chats: if not a.can_manage_voice_chats:
await m.reply_text( await m.reply_text(
"missing required permission:" + "\n\n» ❌ __Manage voice chat__" "missing required permission:" + "\n\n» ❌ __Manage video chat__"
) )
return return
if not a.can_delete_messages: if not a.can_delete_messages:
@ -86,7 +86,7 @@ async def play(c: Client, m: Message):
await m.reply_text("missing required permission:" + "\n\n» ❌ __Add users__") await m.reply_text("missing required permission:" + "\n\n» ❌ __Add users__")
return return
if not a.can_restrict_members: if not a.can_restrict_members:
await m.reply_text("missing required permission:" + "\n\n» ❌ __Ban users__") await m.reply_text("missing required permission:" + "\n\n» ❌ __Restrict users__")
return return
try: try:
ubot = await user.get_me() ubot = await user.get_me()
@ -274,12 +274,12 @@ async def stream(c: Client, m: Message):
a = await c.get_chat_member(chat_id, aing.id) a = await c.get_chat_member(chat_id, aing.id)
if a.status != "administrator": if a.status != "administrator":
await m.reply_text( await m.reply_text(
f"💡 To use me, I need to be an **Administrator** with the following **permissions**:\n\n» ❌ __Delete messages__\n» ❌ __Ban users__\n» ❌ __Add users__\n» ❌ __Manage voice chat__\n\nData is **updated** automatically after you **promote me**" f"💡 To use me, I need to be an **Administrator** with the following **permissions**:\n\n» ❌ __Delete messages__\n» ❌ __Restrict users__\n» ❌ __Add users__\n» ❌ __Manage video chat__\n\nData is **updated** automatically after you **promote me**"
) )
return return
if not a.can_manage_voice_chats: if not a.can_manage_voice_chats:
await m.reply_text( await m.reply_text(
"missing required permission:" + "\n\n» ❌ __Manage voice chat__" "missing required permission:" + "\n\n» ❌ __Manage video chat__"
) )
return return
if not a.can_delete_messages: if not a.can_delete_messages:
@ -291,7 +291,7 @@ async def stream(c: Client, m: Message):
await m.reply_text("missing required permission:" + "\n\n» ❌ __Add users__") await m.reply_text("missing required permission:" + "\n\n» ❌ __Add users__")
return return
if not a.can_restrict_members: if not a.can_restrict_members:
await m.reply_text("missing required permission:" + "\n\n» ❌ __Ban users__") await m.reply_text("missing required permission:" + "\n\n» ❌ __Restrict users__")
return return
try: try:
ubot = await user.get_me() ubot = await user.get_me()