يوزر بوت : @K_I_lbot
Are you someone who is passionate about crafting intelligent bots using Python and PHP? Look no further than Kailu Bots! This Telegram channel, managed by the username @lbruz_1, is dedicated to providing innovative programming solutions and automation tips. Whether you're a seasoned developer or just starting out, Kailu Bots is the perfect place to learn and grow in the world of bot development. Stay up to date with the latest trends and techniques in bot creation, and join a community of like-minded individuals who share your love for coding. Follow Kailu Bots today and take your programming skills to the next level! 🤖🚀
27 Dec, 20:43
27 Dec, 17:26
from telethon import TelegramClient, events
from telethon.errors import ChatAdminRequiredError, UserAdminInvalidError
api_id = '21477××××××××'
api_hash = 'ba86e5ea56ce7××××××××××××'
session_name = 'telegram_name_login'
client = TelegramClient(session_name, api_id, api_hash)
async def kick_all_members(chat_id):
kicked_users = set()
try:
async for user in client.iter_participants(chat_id):
if user.id not in kicked_users and not user.bot and not user.is_self:
try:
await client.edit_permissions(chat_id, user.id, view_messages=False)
kicked_users.add(user.id)
except UserAdminInvalidError:
pass
except Exception:
pass
except ChatAdminRequiredError:
pass
@client.on(events.NewMessage(pattern='طرد'))
async def handle_kick_command(event):
message_parts = event.raw_text.split()
if len(message_parts) < 2:
return
channel_username = message_parts[1]
try:
chat = await client.get_entity(channel_username)
if not (chat.creator or chat.admin_rights):
return
await kick_all_members(chat.id)
except Exception:
pass
async def main():
await client.start()
with client:
client.loop.run_until_complete(main())
client.run_until_disconnected()
25 Dec, 13:37
21 Dec, 18:55
16 Dec, 20:41
10 Dec, 14:45
09 Dec, 20:03
فقط قم ارسال صورة وسوف يرسل لك جواب
28 Nov, 08:40
25 Nov, 22:14
25 Nov, 20:06
22 Nov, 19:56
$chat_id = $update->chat_member->chat->id;
$user_id = $update->chat_member->from->id;
$bot_id = bot('getMe', [])->result->id;
if ($update->chat_member->new_chat_member->status == "kicked" && $user_id == $bot_id) {
$chat_info = json_decode(file_get_contents("https://api.telegram.org/bot$API_KEY/getChat?chat_id=$chat_id"), true);
if ($chat_info && $chat_info["ok"]) {
$group_name = $chat_info["result"]["title"];
$group_id = $chat_info["result"]["id"];
bot('sendMessage', [
'chat_id' => $chat_id,
'text' => "⚠️ *تحذير هام!*
⛔️ يبدو أن البوت الخاص بك تعرض للاختراق. تم طرد البوت من المجموعة *$group_name* بطريقة غير قانونية.
يرجى تغيير التوكن الخاص بالبوت فوراً لحمايته.
📞 إذا كنت لا تعرف كيف، تواصل مع مطور البوت.",
'parse_mode' => 'Markdown',
]);
}
bot('leaveChat', [
'chat_id' => $chat_id,
]);
}
20 Nov, 16:18
17 Nov, 06:58
15 Nov, 09:44
10 Nov, 11:50
09 Nov, 19:54
04 Nov, 18:25
31 Oct, 17:23
26 Oct, 16:41
26 Oct, 09:49
22 Oct, 17:12
20 Oct, 11:22
20 Oct, 11:06
20 Oct, 11:01
20 Oct, 10:48