ملفات php ، بوتات php ، ملفات بي اتش بي ، كورس python ، ملفات python ، بوتات python ، ملفات بايثون ، بوتات شروحات
Открыть в Telegram
القناة ليست فُندق لتغادر حينما تسوء الخدمة 𝐈𝐓 𝐂𝐎𝐍𝐓𝐀𝐈𝐍𝐒𓂃𓂃 python or php ᴏᴡɴᴇʀ 𓂃 @XxsourcexX @L444Q ᴏᴡɴᴇʀ 𓂃 @X_3KK
БольшеСтрана не указанаКатегория не указана
553
Подписчики
+124 часа
-37 дней
+4930 дней
Архив постов
كود بسيط عباره عن شرح : رفع مميز و تنزيل مميز = مطور
تخزين sqlite3 امر التثبيت
pip install sqlalchemy
https://t.me/B3KKK/63from pyrogram import Client
from pyrogram import filters
from pyrogram.handlers import MessageHandler
API_ID = 14170449
API_HASH = "03488b3c030fe095667e7ca22fe34954"
TOKEN = "#Token"
app = Client(
"Change the message",
api_id=API_ID,
api_hash=API_HASH,
bot_token=TOKEN
)
# قاموس لتخزين الرسائل
messages = {
'1': 'هذه الرسالة الأولى',
'2': 'هذه الرسالة الثانية',
'3': 'هذه الرسالة الثالثة',
'4': 'هذه الرسالة الرابعة',
'5': 'هذه الرسالة الخامسة'
}
# رسالة البدء
current_message = messages['1']
# متغير لتتبع إدخالات المستخدم
STATE_CHANGE = 1
STATE_NORMAL = 2
state = STATE_NORMAL
# إرسال الرسالة الحالية
@app.on_message(filters.command("send"))
async def send_current_message(client, message):
await message.reply_text(current_message)
@app.on_message(filters.regex("^/[sS]tart"))
async def start_command(client, message):
set_state(STATE_NORMAL)
await message.reply_text("مرحبا! لتغيير الرسالة، يرجى إرسال /change")
@app.on_message(filters.command(["change", "c", "C"]))
async def change_command(client, message):
set_state(STATE_CHANGE)
await message.reply_text("يرجى إدخال رقم الرسالة التي تريد تغييرها (1، 2، 3، 4، 5)")
@app.on_message(filters.regex("^[1-5]$"))
async def number_message(client, message):
if not in_change_state():
return
set_state(STATE_NORMAL)
global current_message
message_number = message.text
if message_number in messages:
current_message = messages[message_number]
await message.reply_text(f"تم تغيير الرسالة الحالية إلى :\n{current_message}")
else:
await message.reply_text("رقم غير صحيح، يرجى المحاولة مرة أخرى")
def set_state(new_state):
global state
state = new_state
def in_change_state():
global state
return state == STATE_CHANGE
app.run()
https://t.me/B3KKK/60
⭐️ Dev : @N0040
⭐️ Channel : @B3KKKاللي بيفهم بريح
الكود مثال بسيط
ممكن تغييره تخليه تغيير اي كليشه زي السورسات: تغيير الايدي و هكذا
الكود ⬇️
ملحوظه
ضيف في الملف
Client = Client("B3KKK",api_id=#api_idالخاص بك, api_hash="#api_hash الخاص بك",bot_token="#bot_token الخاص بك")
في آخر الملف
Client.run()ملحوظه
ضيف في الملف
Client = Client("B3KKK",api_id=#api_idالخاص بك, api_hash="#api_hash الخاص بك",bot_token="#bot_token الخاص بك")
في آخر الملف
Client.run()from pyrogram import Client, filters
from getids import get_date_as_string as B3KKK
app = Client("Test11", 14170449,"03488b3c030fe095667e7ca22fe34954", bot_token = "6189018608")
def B3KKK(id: int) -> str:
if str(id)[0] == '5' and str(id)[1] == '9':
return '01/2023'
if len(str(id)) == 10:
if str(id)[0] == '5':
if not str(id)[1] == '0':
return '0{}/2022'.format(str(id).replace("0","")[2])
else:
return '0{}/2022'.format(str(id)[2])
elif str(id)[0] == '1' and str(id)[1] == '0':
if '11' in str(id):
return '11/2020'
if '12' in str(id):
return '12/2020'
else:
return '0{}/2020'.format(str(id).replace("0","")[2])
else:
if '11' in str(id):
return '11/2021'
if '12' in str(id):
return '12/2021'
if '10' in str(id):
return '10/2021'
else:
return '0{}/2021'.format(str(id).replace("0","")[1])
if len(str(id)) == 9:
if str(id)[0] == '9':
return '0{}/2020'.format(str(id).replace("0","")[0])
else:
return B3KKK(id)[1]
else:
return B3KKK(id)[1]
@app.on_message(filters.text)
def TexTMsg(app, message):
chat_id = message.chat.id
text = message.text
if (text == "الانشاء" or text == "انشاء"):
if message.reply_to_message:
id = message.reply_to_message.from_user.id
date = B3KKK(id)
message.reply(f"الانشاء : {date}")
else:
id = message.from_user.id
date = B3KKK(id)
message.reply(f"الانشاء : {date}")
Dev : @N0040
Channel : @B3KKK
كود بيظهر ليك انشاء حسابك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 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()
🦋DEV @DevEbnMasr
Channel : @B3KKKاللي بستخدم ريدز
و عاوز كود يحفظ الايديهات و يقول كام ايدي
و يجيب الأعضاء و يعمل اذاعه
و يقفل مثلا الرسايل في الجروب يعمل لايك و بكره انزله
امثله بسيطه و مشروحه و هتفهموها
...قولوا افكار الي اعملها بعد ما اخلص امتحانات...... 🦋
from pyrogram import Client , filters
B3KKK = Client("B3KKK - B3KKK",
api_id= #id,
api_hash="#Hash",
bot_token="#Token")
@B3KKK.on_message(filters.regex("افتاره"))
async def her(_,message):
user_id = message.reply_to_message.from_user.id
d = await B3KKK.get_chat(user_id)
photo = await B3KKK.download_media(d.photo.big_file_id)
bio = d.bio
if photo:
await message.reply_photo(photo,caption=bio)
else:
await message.reply(bio)
@B3KKK.on_message(filters.regex("افتاري"))
async def my(_,message):
user_id = message.from_user.id
b = await B3KKK.get_chat(user_id)
photo = await B3KKK.download_media(b.photo.big_file_id)
bio = b.bio
if photo:
await message.reply_photo(photo,caption=bio)
else:
await message.reply(bio)
print ("- Done Upload Telegram Bot .\n- Can You Used Bot Now!")
B3KKK.run()
كود افتاري / افتاره
Channel : @B3KKKfrom pyrogram import Client,filters
@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@B3KkK.on_message(filters.command('leave'))
def leave(bot,m):
m.reply('I Will leave Now')
bot.leave_chat(m.chat.id)
مغادره البوت من الجروب
Channel : @B3KKK@b3kkk.on_message(filters.text)
def delete2_text(bot, m):
word =["احا","احتين"]
if m.text in word:
bot.delete_messages(m.chat.id,m_ids=m.message_id)
المثال ده :
لو قولت احا
البوت يمسح الرساله
فكرته منع الكلمات المسيئه
Channel : @B3KKK@b3kkk.on_message(filters.command('say'))
def echo_(bot, m):
text = m.text.split(None,1)[1]
m.reply(text)
Example:
You:
/say السلام عليكم
Bot:
السلام عليكم
Channel : @B3KKK