This commit is contained in:
levina 2021-11-22 16:43:21 +07:00 committed by GitHub
parent c2ace481cb
commit a47c6280ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ 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» ❌ __Restrict users__\n» ❌ __Add users__\n» ❌ __Manage video 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» ❌ __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:
@ -87,9 +87,6 @@ async def play(c: Client, m: Message):
if not a.can_invite_users: if not a.can_invite_users:
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:
await m.reply_text("missing required permission:" + "\n\n» ❌ __Restrict users__")
return
try: try:
ubot = await user.get_me() ubot = await user.get_me()
b = await c.get_chat_member(chat_id, ubot.id) b = await c.get_chat_member(chat_id, ubot.id)
@ -142,7 +139,7 @@ async def play(c: Client, m: Message):
) )
else: else:
try: try:
await suhu.edit("🔄 **Joining Vc...**") await suhu.edit("🔄 **Joining vc...**")
await call_py.join_group_call( await call_py.join_group_call(
chat_id, chat_id,
AudioPiped( AudioPiped(
@ -192,7 +189,7 @@ async def play(c: Client, m: Message):
) )
else: else:
try: try:
await suhu.edit("🔄 **Joining Vc...**") await suhu.edit("🔄 **Joining vc...**")
await call_py.join_group_call( await call_py.join_group_call(
chat_id, chat_id,
AudioPiped( AudioPiped(
@ -243,7 +240,7 @@ async def play(c: Client, m: Message):
) )
else: else:
try: try:
await suhu.edit("🔄 **Joining Vc...**") await suhu.edit("🔄 **Joining vc...**")
await call_py.join_group_call( await call_py.join_group_call(
chat_id, chat_id,
AudioPiped( AudioPiped(
@ -287,7 +284,7 @@ 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» ❌ __Restrict users__\n» ❌ __Add users__\n» ❌ __Manage video 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» ❌ __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:
@ -303,9 +300,6 @@ async def stream(c: Client, m: Message):
if not a.can_invite_users: if not a.can_invite_users:
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:
await m.reply_text("missing required permission:" + "\n\n» ❌ __Restrict users__")
return
try: try:
ubot = await user.get_me() ubot = await user.get_me()
b = await c.get_chat_member(chat_id, ubot.id) b = await c.get_chat_member(chat_id, ubot.id)
@ -361,7 +355,7 @@ async def stream(c: Client, m: Message):
) )
else: else:
try: try:
await suhu.edit("🔄 **Joining Vc...**") await suhu.edit("🔄 **Joining vc...**")
await call_py.join_group_call( await call_py.join_group_call(
chat_id, chat_id,
AudioPiped( AudioPiped(