command
create group call
This commit is contained in:
parent
febbfe5b57
commit
60b1e4788d
@ -58,7 +58,7 @@ async def leave_chat(_, m: Message):
|
||||
)
|
||||
|
||||
|
||||
@Client.on_message(command(["leaveall", f"leaveall@{BOT_USERNAME}"]))
|
||||
@Client.on_message(command(["leaveall", f"leaveall@{BOT_USERNAME}"]) & ~filters.edited)
|
||||
@bot_creator
|
||||
async def leave_all(client, message):
|
||||
if message.from_user.id not in SUDO_USERS:
|
||||
@ -88,6 +88,29 @@ async def leave_all(client, message):
|
||||
)
|
||||
|
||||
|
||||
@Client.on_message(command(["startvc", f"startvc@{BOT_USERNAME}"]) & other_filters)
|
||||
@check_blacklist()
|
||||
@authorized_users_only
|
||||
async def start_group_call(c: Client, m: Message):
|
||||
chat_id = m.chat.id
|
||||
try:
|
||||
peer = await user.resolve_peer(chat_id)
|
||||
await user.send(
|
||||
CreateGroupCall(
|
||||
peer=InputPeerChannel(
|
||||
channel_id=peer.channel_id,
|
||||
access_hash=peer.access_hash,
|
||||
),
|
||||
random_id=user.rnd_id() // 9000000000,
|
||||
)
|
||||
)
|
||||
msg = await c.send_message(
|
||||
chat_id, "✅ Group call started !"
|
||||
)
|
||||
except Exception as e:
|
||||
await msg.edit(f"🚫 error: `{e}`")
|
||||
|
||||
|
||||
@Client.on_message(filters.left_chat_member)
|
||||
async def bot_kicked(c: Client, m: Message):
|
||||
bot_id = me_bot.id
|
||||
|
Loading…
Reference in New Issue
Block a user