forked from sultansq/kiu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
menfcall.py
36 lines (33 loc) · 1.56 KB
/
menfcall.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from pyrogram import filters, Client
from AnonX import app
import asyncio
from pytgcalls import PyTgCalls, StreamType
from pytgcalls.types.input_stream import AudioPiped, AudioVideoPiped
from AnonX.core.call import Anon
from AnonX.utils.database import *
from pytgcalls.exceptions import (NoActiveGroupCall,TelegramServerError)
@app.on_message(filters.regex("مين في الكول"))
async def strcall(client, message):
assistant = await group_assistant(Anon,message.chat.id)
try:
await assistant.join_group_call(message.chat.id, AudioPiped("./assets/vega.mp3"), stream_type=StreamType().pulse_stream)
text="🔔 الاعضاء المتواجدين في الكول :\n\n"
participants = await assistant.get_participants(message.chat.id)
k =0
for participant in participants:
info = participant
if info.muted == False:
mut="يتحدث 🗣"
else:
mut="ساكت 🔕"
user = await client.get_users(participant.user_id)
k +=1
text +=f"{k}➤{user.mention}➤{mut}\n"
text += f"\nعددهم : {len(participants)}\n✔️"
await message.reply(f"{text}")
await asyncio.sleep(5)
await assistant.leave_group_call(message.chat.id)
except NoActiveGroupCall:
await message.reply(f"عمووووو الكول مش مفتوح اصلااا\n❌")
except TelegramServerError:
await message.reply(f"ارسل الامر تاني في مشكله في سيرفر التلجرام\n❌")