اكواد ♡ ⎙ ᑭᕼᑭ،ᑭY،ᒪᑌᗩ،⏎
قناة محتواها تجميعه اكواد من مبرمجين و مطورين عرب 🌍 مجمعه بواسطة : @hms_01 ──────────────── 🕰╽الساعة الان بتوقيت السعوديه⇜ 01:06 ص ؛ 🌏╽مايو/2024/5/22 ؛ 🌈╽اليوم⇜ الأربعاء ؛
نمایش بیشتر709
مشترکین
-124 ساعت
+27 روز
+1030 روز
توزیع زمان ارسال
در حال بارگیری داده...
Find out who reads your channel
This graph will show you who besides your subscribers reads your channel and learn about other sources of traffic.تجزیه و تحلیل انتشار
پست ها | بازدید ها | به اشتراک گذاشته شده | ديناميک بازديد ها |
01 ↫︙كود مغادر جميع القنوات و الجموعات الي بل حساب معا حذف المحدثات من الحساب 🔻
# Requier Moduels
from pyrogram import Client, enums
import asyncio
# Config Bot
class Config:
SESSION : str = "<SESSIONS>"
API_HASH : str = "95f5f60466a696e33a34f297c734d048"
API_ID : int = 22119881
async def LEAVE_ALL_CHAT(sessions: str):
# Start Pyrorgam App
app = Client(":memeory:", api_hash=Config.API_HASH, api_id=Config.API_ID,session_string=sessions, in_memory=True, workers=3, no_updates=True)
# Start App
try:
await app.connect()
me = await app.get_me()
except Exception as e:
await app.disconnect()
return False
# Start Levae Chat
async for chat in app.get_dialogs():
# Check Chat Tyrp
if chat.chat.type in [enums.ChatType.CHANNEL , enums.ChatType.SUPERGROUP ,enums.ChatType.GROUP]:
# Leave Chat
await app.leave_chat(chat.chat.id, delete=True)
# Disconnect Pyrogrma Client
await app.disconnect()
asyncio.run(LEAVE_ALL_CHAT(
Config.SESSION
))
↫︙Dev : @R_AFX ↫︙CH @radfx2 ⭐ | 85 | 7 | Loading... |
02 ↫︙كود بوت حضر اي شخص يغادر من الدردشة 🔻
# Requier Pyrogram Modules
from pyrogram import Client, filters, types
import asyncio
# Config app Class
class Config:
API_KEY : str ="API_KEY"
API_HASH : str = "95f5f60466a696e33a34f297c734d048"
API_ID : int = 22119881
app = Client(
'rad',
bot_token=Config.API_KEY,
api_hash=Config.API_HASH,
api_id=Config.API_ID
)
# On Left Member Filter
def on_left_member():
def func(_, __, message: types.Message):
return True if message.old_chat_member else False
return filters.create(func)
# On left member
@app.on_chat_member_updated(on_left_member())
async def ON_LEFT_MEMBER(app: Client, message: types.Message):
# Bind Chat Member
await app.ban_chat_member(
chat_id=message.chat.id, user_id=message.from_user.id
)
# Run Pyrogram App
asyncio.run(app.run())
↫︙Dev : @R_AFX ↫︙CH @radfx2 ⭐ | 100 | 6 | Loading... |
03 php
$update = json_decode(file_get_contents('php://input'));
$message =$update->message;
$chat_id =$message->chat->id;
$text =$message->text;
$sudo = array("5401732523","","","","","","");
$mid = $message->message_id;
$del = explode(' ', $text);
$get_dele = file_get_contents('delete.txt');
$dele = explode( "\n" , $get_dele);
if($text == 'تفعيل الحذف' and in_array($from_id,$sudo) and ! in_array($chat_id , $dele)){
file_put_contents('delete.txt' ,"\n" . $chat_id, FILE_APPEND);
bot('sendmessage',[
'chat_id' =>$chat_id,
'text'=>'اهلا عزيزي المطور تم تفعيل امر حذف الرسائل',
'parse_mode' =>"markdown",
'reply_to_message_id'=>$message->message_id,
]);}
if($text == 'تفعيل الحذف' and !in_array($from_id,$sudo) and in_array($chat_id , $dele)){
bot('sendmessage',[
'chat_id' =>$chat_id,
'text'=>'عذرا عزيزي الامر ليس لك',
'parse_mode' =>"markdown",
'reply_to_message_id'=>$message->message_id,
]);}
if($text == 'تعطيل الحذف' and in_array($from_id,$sudo) and in_array($chat_id , $dele)){
$Close = file_get_contents("delete.txt");
$str = str_replace($chat_id , ' ', $Close);
file_put_contents("delete.txt",$str);
bot('sendMessage', [
'chat_id'=>$chat_id,
'text'=>'اهلا عزيزي المطور تم تعطيل امر الحذف',
'parse_mode' =>"markdown",
'reply_to_message_id'=>$message->message_id,
]);}
if($text == 'تعطيل الحذف' and !in_array($from_id,$sudo) and in_array($chat_id , $dele)){
bot('sendmessage',[
'chat_id' =>$chat_id,
'text'=>'عذرا عزيزي الامر ليس لك',
'parse_mode' =>"markdown",
'reply_to_message_id'=>$message->message_id,
]);}
if($del[0] == 'حذف' and isset($del[1]) and $del[1] < 90 and in_array($chat_id , $dele) and in_array($from_id , $sudo)){
for($i = $mid - $del[1]; $i < $mid; $i++){
bot('deleteMessage',[
'chat_id'=>$chat_id,
'message_id'=>$i,
]);}
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>"تم حذف ".$del[1]." من الرسائل ",
]);}
if($del[0] == 'حذف' and isset($del[1]) and $del[1] > 90 and in_array($chat_id , $dele) and in_array($from_id , $sudo)){
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>'عذرا عزيزي ممنوع حذف 100 رساله فما فوق'
]);}
if($del[0] == 'حذف' and isset($del[1]) and $del[1] < 90 and in_array($chat_id , $dele) and !in_array($from_id , $sudo)){
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>'عذرا عزيزي الامر ليس لك'
]);}
كود بسيط حذف رسائل اذا احد يحتاجه
@l_b10 | 163 | 4 | Loading... |
04 $update = json_decode(file_get_contents('php://input'));
$message = $update->message;
$message_id = $update->message->message_id;
$chat_id = $message->chat->id;
$text = $message->text;
if (preg_match('/^مسح\s+\d+$/', $text)) {
preg_match('/\d+/', $text, $matches);
$count = intval($matches[0]);
for ($i = 0; $i < $count; $i++) {
bot('deleteMessage', [
'chat_id' => $chat_id,
'message_id' => $message_id - $i,
]);
}
}
دا كود من ملف الحمايه الي بعمله
تكتب مسح + عدد الرسايل ال عايز تمسحها
كود سهل جدا
خاص ب @Abdo_1
كل ال طالبه دعوه حلوه عشان داخل على امتحانات ♥ | 245 | 4 | Loading... |
05 ↫︙فنكشن تحقق من تنسيق معرف تليكرام🔻
↫︙Function Check Telegram Username Format 🔻
def is_telegram(username: str) :
return type(username[0]) == str and username.isidentifier() and len(username) > 4 and len(username) < 32
# The Result
is_telegram('r_afx') # True
is_telegram('xxxx') # False
is_telegram('xx-x') # False
is_telegram('3aaaa') # False
↫︙Dev : @R_AFX ↫︙CH @radfx2 ⭐️ | 220 | 2 | Loading... |
06 ↫︙ فنكشن ترجمة كوكل php 🔻
↫︙Function Translate Google 🔻
function translate($text,$source_lang='auto',$target_lang='ar'){
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://translate.googleapis.com/translate_a/single?client=gtx&dt=t',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'sl='.$source_lang.'&tl='.$target_lang.'&q='.urlencode($text),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
$sentencesArray = json_decode($response, true);
$sentences = "";
foreach ($sentencesArray[0] as $s) {
$sentences .= isset($s[0]) ? $s[0] : '';
}
return $sentences;
}
$R = translate('hi','en', 'ar');
echo $R;
# The Result
$trans = translate('Hi Man', 'auto', 'ar') # مرحبا يا رجل
.
↫︙Dev : @R_AFX ↫︙CH @radfx2 ⭐️ | 183 | 3 | Loading... |
07 $update = json_decode(file_get_contents('php://input'));
if ($update->callback_query) {
$data = $update->callback_query->data;
$chat_id = $update->callback_query->message->chat->id;
$message_id = $update->callback_query->message->message_id;
$name = $update->callback_query->message->chat->first_name;
$from_id = $update->callback_query->from->id;
} elseif ($update->message) {
$message = $update->message;
$message_id = $update->message->message_id;
$chat_id = $message->chat->id;
$text = $message->text;
$name = $message->from->first_name;
$from_id = $message->from->id;
}
$nogom = [];
if (file_exists('nogom.json')) {
$nogom = json_decode(file_get_contents('nogom.json'), true);
}
if ($text == "تقييم") {
$average_rating = $nogom ? array_sum($nogom) / count($nogom) : 0;
$nogomall = count($nogom);
$stars = str_repeat("⭐", round($average_rating));
$average_rating = round($average_rating, 1);
bot('sendMessage', [
'chat_id' => $chat_id,
'text' => "
Evaluation
$stars ($average_rating)
عدد المشاركين في التقييم --> ($nogomall)
يرجى المشاركة في تقييم البوت من خلال الأزرار",
'parse_mode' => "markdown",
'reply_markup' => json_encode([
'inline_keyboard' => [
[['text' => "⭐", 'callback_data' => "1"]],
[['text' => "⭐⭐", 'callback_data' => "2"]],
[['text' => "⭐⭐⭐", 'callback_data' => "3"]],
[['text' => "⭐⭐⭐⭐", 'callback_data' => "4"]],
[['text' => "⭐⭐⭐⭐⭐", 'callback_data' => "5"]],
]
])
]); // خاص ب عبدو @abdo_1
} elseif (in_array($data, ["1", "2", "3", "4", "5"])) {
$rating = (int)$data;
$nogom[$chat_id] = $rating;
file_put_contents('nogom.json', json_encode($nogom));
$average_rating = array_sum($nogom) / count($nogom);
$stars = str_repeat("⭐", round($average_rating));
$average_rating = round($average_rating, 1);
bot('editMessagetext', [
'chat_id' => $chat_id,
'message_id' => $message_id,
'text' => "شكرا لتقييمك
Evaluation
$stars ($average_rating)
",
'parse_mode' => "markdown",
'reply_markup' => json_encode([
'inline_keyboard' => [
[['text' => "إعادة التقييم", 'callback_data' => "nogom"]],
]])
]);
bot("sendMessage", [
"chat_id" => $admin,
"text" => "تم تقيم البوت من $name
تقييمه للبوت $rating ⭐
Acount ",
"parse_mode" => "markdown",
'reply_markup' => json_encode([
'inline_keyboard' => [
[['text' => "إرسال شكر 🌹", 'callback_data' => "shkr|$from_id|$name"]],
]])
]);
} elseif(explode("|", $data)[0] == "shkr") {
$from_id = explode("|", $data)[1];
$name = explode("|", $data)[2];
bot("editMessagetext",[
"chat_id" => $chat_id,
'message_id' => $message_id ,
"text" => "
* -تم ارسال رسالة شكر لـ *$name ✓
" ,
"parse_mode" => "markdown",
]);
bot("sendMessage", [
"chat_id" => $from_id ,
"text" => "
*- شكرا لك على تقييمنا هذا الشكر موجه لك من مالك البوت شخصيا 😊♥*
", #@abdo_1
"parse_mode" => "markdown",
]);
}
كود ال تقييم البوتات موجود ف بوتي بعض الناس طلبوه
كتابتي تخمط اذكر المصدر @abdo_1 √
تبعت تقييم وهتظهر لوحة التقييم
المتغيرات متعرفه ممكن تحطه ف اخر الملف بتاعك
الكود كتابتي وواخد الفكره من قناة همس
كل الي طالبه دعوه حلوه عشان امتحاناتي قربت 💔 | 308 | 3 | Loading... |
08 حساب عمر بدون Api
احسب + سنه ميلادك فقط
حقوق @ukkkp | 309 | 1 | Loading... |
↫︙كود مغادر جميع القنوات و الجموعات الي بل حساب معا حذف المحدثات من الحساب 🔻
# Requier Moduels
from pyrogram import Client, enums
import asyncio
# Config Bot
class Config:
SESSION : str = "<SESSIONS>"
API_HASH : str = "95f5f60466a696e33a34f297c734d048"
API_ID : int = 22119881
async def LEAVE_ALL_CHAT(sessions: str):
# Start Pyrorgam App
app = Client(":memeory:", api_hash=Config.API_HASH, api_id=Config.API_ID,session_string=sessions, in_memory=True, workers=3, no_updates=True)
# Start App
try:
await app.connect()
me = await app.get_me()
except Exception as e:
await app.disconnect()
return False
# Start Levae Chat
async for chat in app.get_dialogs():
# Check Chat Tyrp
if chat.chat.type in [enums.ChatType.CHANNEL , enums.ChatType.SUPERGROUP ,enums.ChatType.GROUP]:
# Leave Chat
await app.leave_chat(chat.chat.id, delete=True)
# Disconnect Pyrogrma Client
await app.disconnect()
asyncio.run(LEAVE_ALL_CHAT(
Config.SESSION
))
↫︙Dev : @R_AFX ↫︙CH @radfx2 ⭐↫︙كود بوت حضر اي شخص يغادر من الدردشة 🔻
# Requier Pyrogram Modules
from pyrogram import Client, filters, types
import asyncio
# Config app Class
class Config:
API_KEY : str ="API_KEY"
API_HASH : str = "95f5f60466a696e33a34f297c734d048"
API_ID : int = 22119881
app = Client(
'rad',
bot_token=Config.API_KEY,
api_hash=Config.API_HASH,
api_id=Config.API_ID
)
# On Left Member Filter
def on_left_member():
def func(_, __, message: types.Message):
return True if message.old_chat_member else False
return filters.create(func)
# On left member
@app.on_chat_member_updated(on_left_member())
async def ON_LEFT_MEMBER(app: Client, message: types.Message):
# Bind Chat Member
await app.ban_chat_member(
chat_id=message.chat.id, user_id=message.from_user.id
)
# Run Pyrogram App
asyncio.run(app.run())
↫︙Dev : @R_AFX ↫︙CH @radfx2 ⭐php
$update = json_decode(file_get_contents('php://input'));
$message =$update->message;
$chat_id =$message->chat->id;
$text =$message->text;
$sudo = array("5401732523","","","","","","");
$mid = $message->message_id;
$del = explode(' ', $text);
$get_dele = file_get_contents('delete.txt');
$dele = explode( "\n" , $get_dele);
if($text == 'تفعيل الحذف' and in_array($from_id,$sudo) and ! in_array($chat_id , $dele)){
file_put_contents('delete.txt' ,"\n" . $chat_id, FILE_APPEND);
bot('sendmessage',[
'chat_id' =>$chat_id,
'text'=>'اهلا عزيزي المطور تم تفعيل امر حذف الرسائل',
'parse_mode' =>"markdown",
'reply_to_message_id'=>$message->message_id,
]);}
if($text == 'تفعيل الحذف' and !in_array($from_id,$sudo) and in_array($chat_id , $dele)){
bot('sendmessage',[
'chat_id' =>$chat_id,
'text'=>'عذرا عزيزي الامر ليس لك',
'parse_mode' =>"markdown",
'reply_to_message_id'=>$message->message_id,
]);}
if($text == 'تعطيل الحذف' and in_array($from_id,$sudo) and in_array($chat_id , $dele)){
$Close = file_get_contents("delete.txt");
$str = str_replace($chat_id , ' ', $Close);
file_put_contents("delete.txt",$str);
bot('sendMessage', [
'chat_id'=>$chat_id,
'text'=>'اهلا عزيزي المطور تم تعطيل امر الحذف',
'parse_mode' =>"markdown",
'reply_to_message_id'=>$message->message_id,
]);}
if($text == 'تعطيل الحذف' and !in_array($from_id,$sudo) and in_array($chat_id , $dele)){
bot('sendmessage',[
'chat_id' =>$chat_id,
'text'=>'عذرا عزيزي الامر ليس لك',
'parse_mode' =>"markdown",
'reply_to_message_id'=>$message->message_id,
]);}
if($del[0] == 'حذف' and isset($del[1]) and $del[1] < 90 and in_array($chat_id , $dele) and in_array($from_id , $sudo)){
for($i = $mid - $del[1]; $i < $mid; $i++){
bot('deleteMessage',[
'chat_id'=>$chat_id,
'message_id'=>$i,
]);}
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>"تم حذف ".$del[1]." من الرسائل ",
]);}
if($del[0] == 'حذف' and isset($del[1]) and $del[1] > 90 and in_array($chat_id , $dele) and in_array($from_id , $sudo)){
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>'عذرا عزيزي ممنوع حذف 100 رساله فما فوق'
]);}
if($del[0] == 'حذف' and isset($del[1]) and $del[1] < 90 and in_array($chat_id , $dele) and !in_array($from_id , $sudo)){
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>'عذرا عزيزي الامر ليس لك'
]);}
كود بسيط حذف رسائل اذا احد يحتاجه
@l_b10$update = json_decode(file_get_contents('php://input'));
$message = $update->message;
$message_id = $update->message->message_id;
$chat_id = $message->chat->id;
$text = $message->text;
if (preg_match('/^مسح\s+\d+$/', $text)) {
preg_match('/\d+/', $text, $matches);
$count = intval($matches[0]);
for ($i = 0; $i < $count; $i++) {
bot('deleteMessage', [
'chat_id' => $chat_id,
'message_id' => $message_id - $i,
]);
}
}
دا كود من ملف الحمايه الي بعمله
تكتب مسح + عدد الرسايل ال عايز تمسحها
كود سهل جدا
خاص ب @Abdo_1
كل ال طالبه دعوه حلوه عشان داخل على امتحانات ♥↫︙فنكشن تحقق من تنسيق معرف تليكرام🔻
↫︙Function Check Telegram Username Format 🔻
def is_telegram(username: str) :
return type(username[0]) == str and username.isidentifier() and len(username) > 4 and len(username) < 32
# The Result
is_telegram('r_afx') # True
is_telegram('xxxx') # False
is_telegram('xx-x') # False
is_telegram('3aaaa') # False
↫︙Dev : @R_AFX ↫︙CH @radfx2 ⭐️↫︙ فنكشن ترجمة كوكل php 🔻
↫︙Function Translate Google 🔻
function translate($text,$source_lang='auto',$target_lang='ar'){
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://translate.googleapis.com/translate_a/single?client=gtx&dt=t',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'sl='.$source_lang.'&tl='.$target_lang.'&q='.urlencode($text),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
$sentencesArray = json_decode($response, true);
$sentences = "";
foreach ($sentencesArray[0] as $s) {
$sentences .= isset($s[0]) ? $s[0] : '';
}
return $sentences;
}
$R = translate('hi','en', 'ar');
echo $R;
# The Result
$trans = translate('Hi Man', 'auto', 'ar') # مرحبا يا رجل
.
↫︙Dev : @R_AFX ↫︙CH @radfx2 ⭐️👍 1
$update = json_decode(file_get_contents('php://input'));
if ($update->callback_query) {
$data = $update->callback_query->data;
$chat_id = $update->callback_query->message->chat->id;
$message_id = $update->callback_query->message->message_id;
$name = $update->callback_query->message->chat->first_name;
$from_id = $update->callback_query->from->id;
} elseif ($update->message) {
$message = $update->message;
$message_id = $update->message->message_id;
$chat_id = $message->chat->id;
$text = $message->text;
$name = $message->from->first_name;
$from_id = $message->from->id;
}
$nogom = [];
if (file_exists('nogom.json')) {
$nogom = json_decode(file_get_contents('nogom.json'), true);
}
if ($text == "تقييم") {
$average_rating = $nogom ? array_sum($nogom) / count($nogom) : 0;
$nogomall = count($nogom);
$stars = str_repeat("⭐", round($average_rating));
$average_rating = round($average_rating, 1);
bot('sendMessage', [
'chat_id' => $chat_id,
'text' => "
Evaluation
$stars ($average_rating)
عدد المشاركين في التقييم --> ($nogomall)
يرجى المشاركة في تقييم البوت من خلال الأزرار",
'parse_mode' => "markdown",
'reply_markup' => json_encode([
'inline_keyboard' => [
[['text' => "⭐", 'callback_data' => "1"]],
[['text' => "⭐⭐", 'callback_data' => "2"]],
[['text' => "⭐⭐⭐", 'callback_data' => "3"]],
[['text' => "⭐⭐⭐⭐", 'callback_data' => "4"]],
[['text' => "⭐⭐⭐⭐⭐", 'callback_data' => "5"]],
]
])
]); // خاص ب عبدو @abdo_1
} elseif (in_array($data, ["1", "2", "3", "4", "5"])) {
$rating = (int)$data;
$nogom[$chat_id] = $rating;
file_put_contents('nogom.json', json_encode($nogom));
$average_rating = array_sum($nogom) / count($nogom);
$stars = str_repeat("⭐", round($average_rating));
$average_rating = round($average_rating, 1);
bot('editMessagetext', [
'chat_id' => $chat_id,
'message_id' => $message_id,
'text' => "شكرا لتقييمك
Evaluation
$stars ($average_rating)
",
'parse_mode' => "markdown",
'reply_markup' => json_encode([
'inline_keyboard' => [
[['text' => "إعادة التقييم", 'callback_data' => "nogom"]],
]])
]);
bot("sendMessage", [
"chat_id" => $admin,
"text" => "تم تقيم البوت من $name
تقييمه للبوت $rating ⭐
Acount ",
"parse_mode" => "markdown",
'reply_markup' => json_encode([
'inline_keyboard' => [
[['text' => "إرسال شكر 🌹", 'callback_data' => "shkr|$from_id|$name"]],
]])
]);
} elseif(explode("|", $data)[0] == "shkr") {
$from_id = explode("|", $data)[1];
$name = explode("|", $data)[2];
bot("editMessagetext",[
"chat_id" => $chat_id,
'message_id' => $message_id ,
"text" => "
* -تم ارسال رسالة شكر لـ *$name ✓
" ,
"parse_mode" => "markdown",
]);
bot("sendMessage", [
"chat_id" => $from_id ,
"text" => "
*- شكرا لك على تقييمنا هذا الشكر موجه لك من مالك البوت شخصيا 😊♥*
", #@abdo_1
"parse_mode" => "markdown",
]);
}
كود ال تقييم البوتات موجود ف بوتي بعض الناس طلبوه
كتابتي تخمط اذكر المصدر @abdo_1 √
تبعت تقييم
وهتظهر لوحة التقييم
المتغيرات متعرفه ممكن تحطه ف اخر الملف بتاعك
الكود كتابتي وواخد الفكره من قناة همس
كل الي طالبه دعوه حلوه عشان امتحاناتي قربت 💔آرشیو پست ها