Forwarded from PyCrazy
اله حاسبه.py
3.2 KB
pip install pyrogramPlease open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from PyCrazy
لوحه بايروجرام 1.py
59.3 KB
pip install pyrogram==2.0.56pip install pyromod==1.5pip install requestsPlease open Telegram to view this post
VIEW IN TELEGRAM
لوحه بايروجرام 2.py
59.5 KB
pip install pyrogram==2.0.56pip install pyromod==1.5pip install requestsكتابتي....
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❤1👍1
Forwarded from PyCrazy
Forwarded from PyCrazy
PyCrazy
Photo
from pyrogram.types import Message
from pyrogram import filters, Client
from io import BytesIO
from aiohttp import ClientSession
import sys
import traceback
from functools import wraps
from pyrogram.errors.exceptions.forbidden_403 import ChatWriteForbidden
OWNER_ID = 5565674333
def split_limits(text):
if len(text) < 2048:
return [text]
lines = text.splitlines(True)
small_msg = ""
result = []
for line in lines:
if len(small_msg) + len(line) < 2048:
small_msg += line
else:
result.append(small_msg)
small_msg = line
result.append(small_msg)
return result
def capture_err(func):
@wraps(func)
async def capture(client, message, *args, **kwargs):
try:
return await func(client, message, *args, **kwargs)
except ChatWriteForbidden:
return
except Exception as err:
exc_type, exc_obj, exc_tb = sys.exc_info()
errors = traceback.format_exception(
exc_type,
value=exc_obj,
tb=exc_tb,
)
error_feedback = split_limits(
"ERROR | {} | {}\n\n
{}
\n\n
{}
\n".format(
0 if not message.from_user else message.from_user.id,
0 if not message.chat else message.chat.id,
message.text or message.caption,
"".join(errors),
),
)
for x in error_feedback:
await Client.send_message(OWNER_ID, x)
raise err
return capture
async def make_carbon(code):
url = "https://carbonara.solopov.dev/api/cook"
async with ClientSession().post(url, json={"code": code}) as resp:
image = BytesIO(await resp.read())
image.name = "carbon.png"
return image
@Client.on_message(filters.command("carbon"))
@capture_err
async def carbon_func(c:Client, message):
if message.reply_to_message:
if message.reply_to_message.text:
txt = message.reply_to_message.text
else:
return await message.reply_text("ʀᴇᴘʟʏ ᴛᴏ ᴀ ᴍᴇssᴀɢᴇ ᴏʀ ɢɪᴠᴇ sᴏᴍᴇ ᴛᴇxᴛ.")
else:
try:
txt = message.text.split(None, 1)[1]
except IndexError:
return await message.reply_text("ʀᴇᴘʟʏ ᴛᴏ ᴀ ᴍᴇssᴀɢᴇ ᴏʀ ɢɪᴠᴇ sᴏᴍᴇ ᴛᴇxᴛ.")
m = await message.reply_text("ɢᴇɴᴇʀᴀᴛɪɴɢ ᴄᴀʀʙᴏɴ...")
carbon = await make_carbon(txt)
await m.edit_text("ᴜᴩʟᴏᴀᴅɪɴɢ ɢᴇɴᴇʀᴀᴛᴇᴅ ᴄᴀʀʙᴏɴ...")
await c.send_photo(
message.chat.id,
photo=carbon,
caption=f"» ʀᴇᴏᴜᴇsᴛᴇᴅ ʙʏ : {message.from_user.mention}",
)
await m.delete()
carbon.close()Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
Forwarded from PyCrazy
TshakeV2-main.zip
65.4 KB
-سورس حمايه بالغه python
Please open Telegram to view this post
VIEW IN TELEGRAM
❤2
Forwarded from PyCrazy
from pyrogram import Client, filters
from pyrogram.types import Message
app = Client("B3KKK", api_id = 14170449, api_hash = "03488b3c030fe095667e7ca22fe34954", bot_token = "6189018608:")
@app.on_message(filters.video_chat_started)
async def StartCall(c:Client,m:Message):
await m.reply("> تم بدأ مكالمة فيديو ")
@app.on_message(filters.video_chat_ended)
async def EndCall(c:Client,m:Message):
await m.reply("> تم انهاء مكالمة الفيديو")
@app.on_message(filters.video_chat_members_invited)
async def CallTag(c:Client,m:Message):
text = f"¦> قام {m.from_user.mention}\n - بدعوة : "
x = 0
for Name in m.video_chat_members_invited.users:
try:
text += f"[{Name.first_name}](tg://user?id={Name.id}) "
x += 1
except Exception as e:
await m.reply(str(e) +
"\n حدث خطأ!!",quote =True)
return
try:
await m.reply(f"{text}")
except Exception as e:
await m.reply(str(e) +
"\n حدث خطأ!!",quote =True)
return
print("انتظر.........")
app.run()
print("تم التشغيل")
#عارف_انو_سهل #لكن_فيه_ناس_بتبيعوا
كود تنبيه بفتح الكول و قفلها
كود تنبيه بدعوه شخص للكول
By : Dev Mohamed 🇪🇬🇪🇬
Pyrogram : Link
👍3
Forwarded from PyCrazy
from pyrogram import Client,filters
☝️هذا الكود اي ريكورد او بصمه تبعتها بطلع الك رابط الريكورد او البصمه اي كان حجمها اي
☝️هذا الكود تحط فيه اي رابط ريكود او بصمه
بين الاقواس. " " و اكتب /s ينرسل البصمه او الريكورد
Channel : @B3KKK
@B3KkK.on_message(filters.voice)
def anything(bot, m):
m.reply(m.voice.file_id) ☝️هذا الكود اي ريكورد او بصمه تبعتها بطلع الك رابط الريكورد او البصمه اي كان حجمها اي
@B3kkk.on_message(filters.command('s'))
def anything_(bot, m):
m.reply_voice("")☝️هذا الكود تحط فيه اي رابط ريكود او بصمه
بين الاقواس. " " و اكتب /s ينرسل البصمه او الريكورد
Channel : @B3KKK
👍2
Forwarded from PyCrazy
...قولوا افكار الي اعملها بعد ما اخلص امتحانات...... 🦋
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from PyCrazy
اللي بستخدم ريدز
و عاوز كود يحفظ الايديهات و يقول كام ايدي
و يجيب الأعضاء و يعمل اذاعه
و يقفل مثلا الرسايل في الجروب يعمل لايك و بكره انزله
امثله بسيطه و مشروحه و هتفهموها
و عاوز كود يحفظ الايديهات و يقول كام ايدي
و يجيب الأعضاء و يعمل اذاعه
و يقفل مثلا الرسايل في الجروب يعمل لايك و بكره انزله
امثله بسيطه و مشروحه و هتفهموها
Forwarded from PyCrazy
from pyrogram import *
from pyrogram.types import *
from os import *
from asyncio import *
app = Client(
"Idd",20993785,"a5378e174b86b9fc3cf1ef284e2767b4",
"6245753453:")
@app.on_message(filters.command('ايدي',''))
async def idd(c:Client,m:Message):
user_id = m.from_user.id
msg = await m.reply('جاري جلب معلومات الحساب...')
user = await c.get_users(user_id)
username = "@"+user.username if user.username else "-"
first_name = user.first_name
last_name = user.last_name if user.last_name else "-"
name = user.first_name+" "+user.last_name if user.last_name else user.first_name
b = (await c.get_chat(user_id)).bio
bio = b if b else '-'
status = str(user.status).replace('UserStatus.','')
dcid = user.dc_id if user.dc_id else '-'
txt = f"""
◈<u> معلومات الحساب </u>◈
- user id : {user_id} ✓
- first name : {first_name} ✓
- last name : {last_name} ✓
- usernane : {username} ✓
- dc id : {dcid} ✓
- is bot : {user.is_bot} ✓
- is scam : {user.is_scam} ✓
- premium : {user.is_premium} ✓
- bio : {bio} ✓
- last seen : {status} ✓
- profile link : <a href='tg://user?id={user_id}'>{name}</a>
"""
ph = user.photo.big_file_id if user.photo else None
if ph:
ph2 = await c.download_media(ph)
await gather(
msg.delete(),
c.send_photo(
m.chat.id,
ph2,
caption=txt)
)
remove(ph2)
else:
await msg.edit(txt)
app.run()Channel : @B3KKK
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
Forwarded from PyCrazy
from pyrogram import Client, filters
from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
from youtube_search import YoutubeSearch as B3KKK
import requests
import yt_dlp
import os
app = Client("Test11", 14170449,"03488b3c030fe095667e7ca22fe34954", bot_token = "6189018608")
@app.on_message(filters.command("يوت", [""]))
async def search(app,m:Message):
AssId = m.from_user.id
Msg = m.text.split(None, 1)[1]
B3 = B3KKK(Msg, max_results=4).to_dict()
buttons = []
for i in B3:
buttons.append([
InlineKeyboardButton(
i["title"],callback_data=f"{AssId}Down{i['id']}"
)])
await m.reply(f"-› نتائج بحثك عن {Msg}:",disable_web_page_preview=True,reply_markup=InlineKeyboardMarkup(buttons))
@app.on_callback_query(filters.regex("Down"))
async def get_info(app, query: CallbackQuery):
AssId = query.data.split("Down")[0]
IdVi = query.data.split("Down")[1]
if not query.from_user.id == int(AssId):
return await query.answer("هذا الأمر لا يخصك ", show_alert=True)
await query.message.delete()
B3 = B3KKK(f'https://youtu.be/{IdVi}', max_results=1).to_dict()
title = B3[0]['title']
url = f'https://youtu.be/{IdVi}'
await app.send_message(
query.message.chat.id,
f"[{title}]({url})",
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup([[
InlineKeyboardButton ("صوت", callback_data=f'{AssId}MuAu{IdVi}'),],[
InlineKeyboardButton("🧚♀", user_id=5565674333),],]))
@app.on_callback_query(filters.regex("MuAu"))
async def get_audii(Mohamed, query: CallbackQuery):
IdVi = query.data.split("MuAu")[1]
AssId = query.data.split("MuAu")[0]
if not query.from_user.id == int(AssId):
return await query.answer("هذا الأمر لا يخصك ", show_alert=True)
url = f'https://youtu.be/{IdVi}'
await query.edit_message_text("⏳ جاري التحميل ..", reply_markup=InlineKeyboardMarkup ([[InlineKeyboardButton("⏳",callback_data='none')]]))
ydl_ops = {"format": "bestaudio[ext=m4a]"}
with yt_dlp.YoutubeDL(ydl_ops) as ydl:
info_dict = ydl.extract_info(url, download=False)
if int(info_dict['duration']) > 3605:
return await query.edit_message_text("حد التحميل ساعة فقط",reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("⚠️",callback_data='none')]]))
audio_file = ydl.prepare_filename(info_dict)
ydl.process_info(info_dict)
await query.edit_message_text("جاري الإرسال ..", reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("🚀",callback_data='none')]]))
response= requests.get(info_dict['thumbnail'])
with open(f"{IdVi}.png", "wb") as file:
file.write(response.content)
user = await app.get_users(int(AssId))
await query.message.reply_audio(audio_file,title=info_dict['title'],duration=int(info_dict['duration']),performer=info_dict['channel'],caption=f'• من طلب -› {user.mention}',thumb=f"{IdVi}.png")
await query.edit_message_text(f"🔗 [{info_dict['title']}]({url})", reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Owner",user_id=int(5565674333))]]),disable_web_page_preview=True)
Thu = f"{IdVi}.png"
os.remove(Thu)
os.remove(audio_file)
app.run()
from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
from youtube_search import YoutubeSearch as B3KKK
import requests
import yt_dlp
import os
app = Client("Test11", 14170449,"03488b3c030fe095667e7ca22fe34954", bot_token = "6189018608")
@app.on_message(filters.command("يوت", [""]))
async def search(app,m:Message):
AssId = m.from_user.id
Msg = m.text.split(None, 1)[1]
B3 = B3KKK(Msg, max_results=4).to_dict()
buttons = []
for i in B3:
buttons.append([
InlineKeyboardButton(
i["title"],callback_data=f"{AssId}Down{i['id']}"
)])
await m.reply(f"-› نتائج بحثك عن {Msg}:",disable_web_page_preview=True,reply_markup=InlineKeyboardMarkup(buttons))
@app.on_callback_query(filters.regex("Down"))
async def get_info(app, query: CallbackQuery):
AssId = query.data.split("Down")[0]
IdVi = query.data.split("Down")[1]
if not query.from_user.id == int(AssId):
return await query.answer("هذا الأمر لا يخصك ", show_alert=True)
await query.message.delete()
B3 = B3KKK(f'https://youtu.be/{IdVi}', max_results=1).to_dict()
title = B3[0]['title']
url = f'https://youtu.be/{IdVi}'
await app.send_message(
query.message.chat.id,
f"[{title}]({url})",
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup([[
InlineKeyboardButton ("صوت", callback_data=f'{AssId}MuAu{IdVi}'),],[
InlineKeyboardButton("🧚♀", user_id=5565674333),],]))
@app.on_callback_query(filters.regex("MuAu"))
async def get_audii(Mohamed, query: CallbackQuery):
IdVi = query.data.split("MuAu")[1]
AssId = query.data.split("MuAu")[0]
if not query.from_user.id == int(AssId):
return await query.answer("هذا الأمر لا يخصك ", show_alert=True)
url = f'https://youtu.be/{IdVi}'
await query.edit_message_text("⏳ جاري التحميل ..", reply_markup=InlineKeyboardMarkup ([[InlineKeyboardButton("⏳",callback_data='none')]]))
ydl_ops = {"format": "bestaudio[ext=m4a]"}
with yt_dlp.YoutubeDL(ydl_ops) as ydl:
info_dict = ydl.extract_info(url, download=False)
if int(info_dict['duration']) > 3605:
return await query.edit_message_text("حد التحميل ساعة فقط",reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("⚠️",callback_data='none')]]))
audio_file = ydl.prepare_filename(info_dict)
ydl.process_info(info_dict)
await query.edit_message_text("جاري الإرسال ..", reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("🚀",callback_data='none')]]))
response= requests.get(info_dict['thumbnail'])
with open(f"{IdVi}.png", "wb") as file:
file.write(response.content)
user = await app.get_users(int(AssId))
await query.message.reply_audio(audio_file,title=info_dict['title'],duration=int(info_dict['duration']),performer=info_dict['channel'],caption=f'• من طلب -› {user.mention}',thumb=f"{IdVi}.png")
await query.edit_message_text(f"🔗 [{info_dict['title']}]({url})", reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Owner",user_id=int(5565674333))]]),disable_web_page_preview=True)
Thu = f"{IdVi}.png"
os.remove(Thu)
os.remove(audio_file)
app.run()
👌3❤2