forked from sultansq/kiu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mdwj.py
154 lines (136 loc) · 5.88 KB
/
mdwj.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
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
@app.on_message(command(["تلغراف", "تلغراف ميديا", "ميديا"]) & ~filters.edited)
async def telegraph(client: Client, message: Message):
replied = message.reply_to_message
if not replied:
await message.reply("🤕 ¦ الرد على ملف وسائط مدعوم\n• حط صوره و اكتب عليها 00")
return
if not (
(replied.photo and replied.photo.file_size <= 5242880)
or (replied.animation and replied.animation.file_size <= 5242880)
or (
replied.video
and replied.video.file_name.endswith(".mp4")
and replied.video.file_size <= 5242880
)
or (
replied.document
and replied.document.file_name.endswith(
(".jpg", ".jpeg", ".png", ".gif", ".mp4"),
)
and replied.document.file_size <= 5242880
)
):
await message.reply("غير مدعوم!!")
return
download_location = await client.download_media(
message=message.reply_to_message,
file_name="root/downloads/",
)
try:
response = upload_file(download_location)
except Exception as document:
await message.reply(message, text=document)
else:
await message.reply(
f"<b>• الــرابـط:-</b>\n\n <code>https://telegra.ph{response[0]}</code>",
quote=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(text="🎯 ¦ افـتح الـرابـط", url=f"https://telegra.ph{response[0]}"),
InlineKeyboardButton(text="♻️ ¦ مشـاركه الـرابـط", url=f"https://telegram.me/share/url?url=https://telegra.ph{response[0]}")
],
]
)
)
finally:
os.remove(download_location)
@app.on_message(command(["معلوماته", "كشف"]) & filters.group & ~filters.edited)
async def hshs(client: Client, message: Message):
usr = await client.get_users(message.reply_to_message.from_user.id)
name = usr.first_name#
user_id = message.reply_to_message.from_user.id#
chat_idd = message.chat.id#
chat_username = f"@{message.chat.username}" #
chat_name = message.chat.title#
username = f"@{message.reply_to_message.from_user.username}"#
async for photo in client.iter_profile_photos(message.reply_to_message.from_user.id, limit=1):
await message.reply_photo(photo.file_id, caption=f"""**[★⌞ 𝘾𝙍 • 𝙎𝙊𝙐𝙍𝘾𝙀 ⌝˹⚡˼](https://t.me/pp_g3)\n\n🐉 ¦ ɴᴀᴍᴇ : {name}\n🤡 ¦ ᴜѕᴇ : {username}\n🔥 ¦ ɪᴅ : `{user_id}`\n🔅 ¦ ɪᴅ ᴄʜᴀᴛ : `{chat_idd}`\n💭 ¦ ᴄʜᴀᴛ : {chat_name}\n🐊 ¦ ɢʀᴏᴜᴘ : {chat_username} \n**""",
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
name, url=f"https://t.me/{message.reply_to_message.from_user.username}")
],
]
),
)
@app.on_message(
command(["بايو","البايو"])
& filters.group
& ~filters.edited
)
async def biio(client, message):
nq = await client.get_chat(message.from_user.id)
bio = nq.bio
await message.reply_text(bio
)
@app.on_message(
command(["شخصيتي", "معلوماتي", "شخصيه"])
& filters.group
& ~filters.edited
)
async def ppdi(client: Client, message: Message):
usr = await client.get_users(message.from_user.id)
name = usr.first_name
async for photo in client.iter_profile_photos(message.from_user.id, limit=1):
await message.reply_photo(photo.file_id, caption=f"""**• انـت » {message.from_user.mention()} يا قلبي ياناس🔥😮💨**""",
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
name, url=f"https://t.me/{message.from_user.username}")
],
]
),
)
@app.on_message(command(["تحويل_لصوره", "تحويل الصوره"]))
async def sticker_image(client: Client, message: Message):
reply = message.reply_to_message
if not reply:
return await message.reply("الرد على ملصق.")
if not reply.sticker:
return await message.reply("الرد على ملصق.")
m = await message.reply("يتم المعالجه..")
f = await reply.download(f"{reply.sticker.file_unique_id}.png")
await gather(*[message.reply_photo(f),message.reply_document(f)])
await m.delete()
os.remove(f)
@app.on_message(command(["الجروب", "جروب"]) & filters.group & ~filters.edited)
async def ginnj(client: Client, message: Message):
chat_idd = message.chat.id
chat_name = message.chat.title
chat_username = f"@{message.chat.username}"
photo = await client.download_media(message.chat.photo.big_file_id)
await message.reply_photo(photo=photo, caption=f"""**🐲 ¦ الاسم » {chat_name}\n🚸 ¦ ايدي الجروب » -{chat_idd}\n🐊 ¦ رابط » {chat_username}**""",
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
chat_name, url=f"https://t.me/{message.chat.username}")
],
]
),
)