forked from sultansq/kiu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
تاك.py
110 lines (92 loc) · 4.31 KB
/
تاك.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import asyncio
import os
import time
import requests
import aiohttp
from pyrogram import filters
from pyrogram import Client
from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, ReplyKeyboardMarkup
from strings.filters import command
from AnonX import (Apple, Resso, SoundCloud, Spotify, Telegram, YouTube, app)
from AnonX import app
from asyncio import gather
from pyrogram.errors import FloodWait
@app.on_message(command(["المالك", "صاحب الخرابه", "المنشي"]) & filters.group)
async def gak_owne(client: Client, message: Message):
if len(message.command) >= 2:
return
else:
chat_id = message.chat.id
f = "administrators"
async for member in client.iter_chat_members(chat_id, filter=f):
if member.status == "creator":
id = member.user.id
key = InlineKeyboardMarkup([[InlineKeyboardButton(member.user.first_name, user_id=id)]])
m = await client.get_chat(id)
if m.photo:
photo = await app.download_media(m.photo.big_file_id)
return await message.reply_photo(photo, caption=f"🧞♂️ ¦𝙽𝙰𝙼𝙴 :{m.first_name}\n🎯 ¦𝚄𝚂𝙴𝚁 :@{m.username}\n🎃 ¦𝙸𝙳 :`{m.id}`\n💌 ¦𝙱𝙸𝙾 :{m.bio}\n✨ ¦𝙲𝙷𝙰𝚃: {message.chat.title}\n♻️ ¦𝙸𝙳.𝙲𝙷𝙰𝚃 :`{message.chat.id}`",reply_markup=key)
else:
return await message.reply("• " + member.user.mention)
@app.on_message(command(["اسمي", "اسمي اي"]) & filters.group )
async def vgdg(client: Client, message: Message):
await message.reply_text(
f"""❤️🔥 اسمك »» {message.from_user.mention()}""")
array = []
@app.on_message(command(["@all", "تاك","تاك للكل"]) & ~filters.private)
async def nummmm(client: app, message):
if message.chat.id in array:
return await message.reply_text("**التاك قيد التشغيل حالياً ،**")
chek = await client.get_chat_member(message.chat.id, message.from_user.id)
if not chek.status in ["administrator", "creator"]:
await message.reply("**يجب انت تكون مشرف لاستخدام الامر 🖱️**")
return
await message.reply_text("**جاري بدأ المنشن ، لايقاف الامر اضغط **\n /cancel او اكتب بس منشن")
i = 0
txt = ""
zz = message.text
if message.photo:
photo_id = message.photo.file_id
photo = await client.download_media(photo_id)
zz = message.caption
try:
zz = zz.replace("@all","").replace("تاك","").replace("نادي الكل","")
except:
pass
array.append(message.chat.id)
async for x in client.iter_chat_members(message.chat.id):
if message.chat.id not in array:
return
if not x.user.is_deleted:
i += 1
txt += f" {x.user.mention} ،"
if i == 5:
try:
if not message.photo:
await client.send_message(message.chat.id, f"{zz}\n{txt}")
else:
await client.send_photo(message.chat.id, photo=photo, caption=f"{zz}\n{txt}")
i = 0
txt = ""
await asyncio.sleep(2)
except FloodWait as e:
flood_time = int(e.x)
if flood_time > 200:
continue
await asyncio.sleep(flood_time)
except Exception:
array.remove(message.chat.id)
array.remove(message.chat.id)
@app.on_message(command(["بس المنشن", "/cancel","بس منشن"]))
async def stop(client, message):
chek = await client.get_chat_member(message.chat.id, message.from_user.id)
if not chek.status in ["administrator", "creator"]:
await message.reply("**يجب انت تكون مشرف لاستخدام الامر 🖱️")
return
if message.chat.id not in array:
await message.reply("**المنشن متوقف بالفعل**")
return
if message.chat.id in array:
array.remove(message.chat.id)
await message.reply("**تم ايقاف المنشن بنجاح✅**")
return