├── Dockerfile ├── Procfile ├── README.md ├── app.py ├── client.py ├── heroku.yml ├── info.py ├── main.py ├── plugins ├── TechVJ ├── broadcast.py ├── connect.py ├── fsub.py ├── generate.py ├── misc.py ├── newgroup.py ├── search.py └── verify.py ├── requirements.txt ├── run cmd.txt └── utils ├── TechVJ ├── __init__.py ├── helpers.py └── script.py /Dockerfile: -------------------------------------------------------------------------------- 1 | # Don't Remove Credit @VJ_Botz 2 | # Subscribe YouTube Channel For Amazing Bot @Tech_VJ 3 | # Ask Doubt on telegram @KingVJ01 4 | 5 | FROM python:3.10.8-slim-buster 6 | 7 | RUN apt update && apt upgrade -y 8 | RUN apt install git -y 9 | COPY requirements.txt /requirements.txt 10 | 11 | RUN cd / 12 | RUN pip3 install -U pip && pip3 install -U -r requirements.txt 13 | RUN mkdir /VJ-Post-Search-Bot 14 | WORKDIR /VJ-Post-Search-Bot 15 | COPY . /VJ-Post-Search-Bot 16 | CMD gunicorn app:app & python3 main.py 17 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | worker: python3 main.py 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
+13124562345, +9171828181889
")
56 | if phone_number_msg.text=='/cancel':
57 | return await phone_number_msg.reply('process cancelled !')
58 | phone_number = phone_number_msg.text
59 | client = Client(":memory:", API_ID, API_HASH)
60 | await client.connect()
61 | await phone_number_msg.reply("Sending OTP...")
62 | try:
63 | code = await client.send_code(phone_number)
64 | phone_code_msg = await bot.ask(user_id, "Please check for an OTP in official telegram account. If you got it, send OTP here after reading the below format. \n\nIf OTP is `12345`, **please send it as** `1 2 3 4 5`.\n\n**Enter /cancel to cancel The Procces**", filters=filters.text, timeout=600)
65 | except PhoneNumberInvalid:
66 | await phone_number_msg.reply('`PHONE_NUMBER` **is invalid.**')
67 | return
68 | if phone_code_msg.text=='/cancel':
69 | return await phone_code_msg.reply('process cancelled !')
70 | try:
71 | phone_code = phone_code_msg.text.replace(" ", "")
72 | await client.sign_in(phone_number, code.phone_code_hash, phone_code)
73 | except PhoneCodeInvalid:
74 | await phone_code_msg.reply('**OTP is invalid.**')
75 | return
76 | except PhoneCodeExpired:
77 | await phone_code_msg.reply('**OTP is expired.**')
78 | return
79 | except SessionPasswordNeeded:
80 | two_step_msg = await bot.ask(user_id, '**Your account has enabled two-step verification. Please provide the password.\n\nEnter /cancel to cancel The Procces**', filters=filters.text, timeout=300)
81 | if two_step_msg.text=='/cancel':
82 | return await two_step_msg.reply('process cancelled !')
83 | try:
84 | password = two_step_msg.text
85 | await client.check_password(password=password)
86 | except PasswordHashInvalid:
87 | await two_step_msg.reply('**Invalid Password Provided**')
88 | return
89 | string_session = await client.export_session_string()
90 | await client.disconnect()
91 | if len(string_session) < SESSION_STRING_SIZE:
92 | return await message.reply('invalid session sring')
93 | try:
94 | user_data = database.find_one({"chat_id": message.from_user.id})
95 | if user_data is not None:
96 | data = {
97 | 'session': string_session,
98 | 'logged_in': True
99 | }
100 |
101 | uclient = Client(":memory:", session_string=data['session'], api_id=API_ID, api_hash=API_HASH)
102 | await uclient.connect()
103 |
104 | database.update_one({'_id': user_data['_id']}, {'$set': data})
105 | except Exception as e:
106 | return await message.reply_text(f"ERROR IN LOGIN: `{e}`")
107 | await bot.send_message(message.from_user.id, "Account Login Successfully.\n\nIf You Get Any Error Related To AUTH KEY Then /logout and /login again")
108 |
109 |
110 | # Don't Remove Credit Tg - @VJ_Botz
111 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
112 | # Ask Doubt on telegram @KingVJ01
113 |
--------------------------------------------------------------------------------
/plugins/misc.py:
--------------------------------------------------------------------------------
1 | # Don't Remove Credit Tg - @VJ_Botz
2 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
3 | # Ask Doubt on telegram @KingVJ01
4 |
5 | from utils import *
6 | from pyrogram import Client, filters
7 | from plugins.generate import database
8 | from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
9 |
10 | @Client.on_message(filters.command("start") & ~filters.channel)
11 | async def start(bot, message):
12 | database.insert_one({"chat_id": message.from_user.id})
13 | username = (await bot.get_me()).username
14 | await add_user(message.from_user.id, message.from_user.first_name)
15 | button = [[
16 | InlineKeyboardButton('➕ ᴀᴅᴅ ᴍᴇ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴘ ➕', url=f'http://t.me/{username}?startgroup=true')
17 | ],[
18 | InlineKeyboardButton("ʜᴇʟᴘ", callback_data="misc_help"),
19 | InlineKeyboardButton("ᴀʙᴏᴜᴛ", callback_data="misc_about")
20 | ],[
21 | InlineKeyboardButton("🤖 ᴜᴘᴅᴀᴛᴇ", url="https://t.me/vj_botz"),
22 | InlineKeyboardButton("🔍 ɢʀᴏᴜᴘ", url="https://t.me/vj_bot_disscussion")
23 | ]]
24 | await message.reply(text=script.START.format(message.from_user.mention),
25 | disable_web_page_preview=True,
26 | reply_markup=InlineKeyboardMarkup(button))
27 |
28 | @Client.on_message(filters.command("help"))
29 | async def help(bot, message):
30 | await message.reply(text=script.HELP,
31 | disable_web_page_preview=True)
32 |
33 | @Client.on_message(filters.command("about"))
34 | async def about(bot, message):
35 | await message.reply(text=script.ABOUT.format((await bot.get_me()).mention),
36 | disable_web_page_preview=True)
37 |
38 | @Client.on_message(filters.command("stats"))
39 | async def stats(bot, message):
40 | g_count, g_list = await get_groups()
41 | u_count, u_list = await get_users()
42 | await message.reply(script.STATS.format(u_count, g_count))
43 |
44 | @Client.on_message(filters.command("id"))
45 | async def id(bot, message):
46 | text = f"Current Chat ID: `{message.chat.id}`\n"
47 | if message.from_user:
48 | text += f"Your ID: `{message.from_user.id}`\n"
49 | if message.reply_to_message:
50 | if message.reply_to_message.from_user:
51 | text += f"Replied User ID: `{message.reply_to_message.from_user.id}`\n"
52 | if message.reply_to_message.forward_from:
53 | text += f"Replied Message Forward from User ID: `{message.reply_to_message.forward_from.id}`\n"
54 | if message.reply_to_message.forward_from_chat:
55 | text += f"Replied Message Forward from Chat ID: `{message.reply_to_message.forward_from_chat.id}\n`"
56 | await message.reply(text)
57 |
58 | @Client.on_callback_query(filters.regex(r"^misc"))
59 | async def misc(bot, update):
60 | data = update.data.split("_")[-1]
61 | if data=="home":
62 | username = (await bot.get_me()).username
63 | button = [[
64 | InlineKeyboardButton('➕ ᴀᴅᴅ ᴍᴇ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴘ ➕', url=f'http://t.me/{username}?startgroup=true')
65 | ],[
66 | InlineKeyboardButton("ʜᴇʟᴘ", callback_data="misc_help"),
67 | InlineKeyboardButton("ᴀʙᴏᴜᴛ", callback_data="misc_about")
68 | ],[
69 | InlineKeyboardButton("🤖 ᴜᴘᴅᴀᴛᴇ", url="https://t.me/vj_botz"),
70 | InlineKeyboardButton("🔍 ɢʀᴏᴜᴘ", url="https://t.me/vj_bot_disscussion")
71 | ]]
72 | await update.message.edit(text=script.START.format(update.from_user.mention),
73 | disable_web_page_preview=True,
74 | reply_markup=InlineKeyboardMarkup(button))
75 | elif data=="help":
76 | await update.message.edit(text=script.HELP,
77 | disable_web_page_preview=True,
78 | reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("⬅️ Back", callback_data="misc_home")]]))
79 |
80 | elif data=="about":
81 | await update.message.edit(text=script.ABOUT.format((await bot.get_me()).mention),
82 | disable_web_page_preview=True,
83 | reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("⬅️ Back", callback_data="misc_home")]]))
84 |
85 |
--------------------------------------------------------------------------------
/plugins/newgroup.py:
--------------------------------------------------------------------------------
1 | # Don't Remove Credit Tg - @VJ_Botz
2 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
3 | # Ask Doubt on telegram @KingVJ01
4 |
5 | from info import *
6 | from utils import *
7 | from asyncio import sleep
8 | from pyrogram import Client, filters
9 |
10 | @Client.on_message(filters.group & filters.new_chat_members)
11 | async def new_group(bot, message):
12 | bot_id = (await bot.get_me()).id
13 | member = [u.id for u in message.new_chat_members]
14 | if bot_id in member:
15 | await add_group(group_id=message.chat.id,
16 | group_name=message.chat.title,
17 | user_name=message.from_user.first_name,
18 | user_id=message.from_user.id,
19 | channels=[],
20 | f_sub=False,
21 | verified=False)
22 | m=await message.reply(f"💢 Thanks for adding me in {message.chat.title} ✨\n\n⭕ Please Get Access By /verify\n\n")
23 | text=f"#NewGroup\n\nGroup: {message.chat.title}\nGroupID: `{message.chat.id}`\nAddedBy: {message.from_user.mention}\nUserID: `{message.from_user.id}`"
24 | await bot.send_message(chat_id=LOG_CHANNEL, text=text)
25 | await sleep(60)
26 | await m.delete()
27 |
--------------------------------------------------------------------------------
/plugins/search.py:
--------------------------------------------------------------------------------
1 | # Don't Remove Credit Tg - @VJ_Botz
2 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
3 | # Ask Doubt on telegram @KingVJ01
4 |
5 | import asyncio
6 | from info import *
7 | from utils import *
8 | from time import time
9 | from plugins.generate import database
10 | from pyrogram import Client, filters
11 | from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message
12 |
13 | async def send_message_in_chunks(client, chat_id, text):
14 | max_length = 4096 # Maximum length of a message
15 | for i in range(0, len(text), max_length):
16 | msg = await client.send_message(chat_id=chat_id, text=text[i:i+max_length])
17 | asyncio.create_task(delete_after_delay(msg, 1800))
18 |
19 |
20 |
21 | async def delete_after_delay(message: Message, delay):
22 | await asyncio.sleep(delay)
23 | try:
24 | await message.delete()
25 | except:
26 | pass
27 |
28 | @Client.on_message(filters.text & filters.group & filters.incoming & ~filters.command(["verify", "connect", "id"]))
29 | async def search(bot, message):
30 | vj = database.find_one({"chat_id": ADMIN})
31 | if vj == None:
32 | return await message.reply("**Contact Admin Then Say To Login In Bot.**")
33 | User = Client("post_search", session_string=vj['session'], api_hash=API_HASH, api_id=API_ID)
34 | await User.connect()
35 | f_sub = await force_sub(bot, message)
36 | if f_sub==False:
37 | return
38 | channels = (await get_group(message.chat.id))["channels"]
39 | if bool(channels)==False:
40 | return
41 | if message.text.startswith("/"):
42 | return
43 | query = message.text
44 | head = f"⭕ Here is the results {message.from_user.mention} 👇\n\n💢 Powered By @VJ_Botz ❗\n\n"
45 | results = ""
46 | try:
47 | for channel in channels:
48 | async for msg in User.search_messages(chat_id=channel, query=query):
49 | name = (msg.text or msg.caption).split("\n")[0]
50 | if name in results:
51 | continue
52 | results += f"♻️ {name}\n🔗 {msg.link}\n\n"
53 | if bool(results)==False:
54 | movies = await search_imdb(query)
55 | buttons = []
56 | for movie in movies:
57 | buttons.append([InlineKeyboardButton(movie['title'], callback_data=f"recheck_{movie['id']}")])
58 | msg = await message.reply_photo(photo="https://graph.org/file/c361a803c7b70fc50d435.jpg",
59 | caption="🔻 I Couldn't find anything related to Your Query😕.\n🔺 Did you mean any of these?",
60 | reply_markup=InlineKeyboardMarkup(buttons))
61 | else:
62 | await send_message_in_chunks(bot, message.chat.id, head+results)
63 | except:
64 | pass
65 |
66 |
67 |
68 | @Client.on_callback_query(filters.regex(r"^recheck"))
69 | async def recheck(bot, update):
70 | vj = database.find_one({"chat_id": ADMIN})
71 | User = Client("post_search", session_string=vj['session'], api_hash=API_HASH, api_id=API_ID)
72 | if vj == None:
73 | return await update.message.edit("**Contact Admin Then Say To Login In Bot.**")
74 | await User.connect()
75 | clicked = update.from_user.id
76 | try:
77 | typed = update.message.reply_to_message.from_user.id
78 | except:
79 | return await update.message.delete(2)
80 | if clicked != typed:
81 | return await update.answer("That's not for you! 👀", show_alert=True)
82 |
83 | m=await update.message.edit("**Searching..💥**")
84 | id = update.data.split("_")[-1]
85 | query = await search_imdb(id)
86 | channels = (await get_group(update.message.chat.id))["channels"]
87 | head = "⭕ I Have Searched Movie With Wrong Spelling But Take care next time 👇\n\n💢 Powered By @VJ_Botz ❗\n\n"
88 | results = ""
89 | try:
90 | for channel in channels:
91 | async for msg in User.search_messages(chat_id=channel, query=query):
92 | name = (msg.text or msg.caption).split("\n")[0]
93 | if name in results:
94 | continue
95 | results += f"♻️🍿 {name}\n\n🔗 {msg.link}\n\n"
96 | if bool(results)==False:
97 | return await update.message.edit("🔺 Still no results found! Please Request To Group Admin 🔻", reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("🎯 Request To Admin 🎯", callback_data=f"request_{id}")]]))
98 | await send_message_in_chunks(bot, update.message.chat.id, head+results)
99 | except Exception as e:
100 | await update.message.edit(f"❌ Error: `{e}`")
101 |
102 |
103 | @Client.on_callback_query(filters.regex(r"^request"))
104 | async def request(bot, update):
105 | clicked = update.from_user.id
106 | try:
107 | typed = update.message.reply_to_message.from_user.id
108 | except:
109 | return await update.message.delete()
110 | if clicked != typed:
111 | return await update.answer("That's not for you! 👀", show_alert=True)
112 |
113 | admin = (await get_group(update.message.chat.id))["user_id"]
114 | id = update.data.split("_")[1]
115 | name = await search_imdb(id)
116 | url = "https://www.imdb.com/title/tt"+id
117 | text = f"#RequestFromYourGroup\n\nName: {name}\nIMDb: {url}"
118 | await bot.send_message(chat_id=admin, text=text, disable_web_page_preview=True)
119 | await update.answer("✅ Request Sent To Admin", show_alert=True)
120 | await update.message.delete(60)
121 |
--------------------------------------------------------------------------------
/plugins/verify.py:
--------------------------------------------------------------------------------
1 | # Don't Remove Credit Tg - @VJ_Botz
2 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
3 | # Ask Doubt on telegram @KingVJ01
4 |
5 | from info import *
6 | from utils import *
7 | from pyrogram import Client, filters
8 | from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
9 |
10 | @Client.on_message(filters.group & filters.command("verify"))
11 | async def _verify(bot, message):
12 | try:
13 | group = await get_group(message.chat.id)
14 | user_id = group["user_id"]
15 | user_name = group["user_name"]
16 | verified = group["verified"]
17 | except:
18 | return await bot.leave_chat(message.chat.id)
19 | try:
20 | user = await bot.get_users(user_id)
21 | except:
22 | return await message.reply(f"❌ {user_name} Need to start me in PM!")
23 | if message.from_user.id != user_id:
24 | return await message.reply(f"Only {user.mention} can use this command 😁")
25 | if verified==True:
26 | return await message.reply("This Group is already verified!")
27 | try:
28 | link = (await bot.get_chat(message.chat.id)).invite_link
29 | except:
30 | return message.reply("❌ Make me admin here with all permissions!")
31 |
32 | text = f"#NewRequest\n\n"
33 | text += f"User: {message.from_user.mention}\n"
34 | text += f"User ID: `{message.from_user.id}`\n"
35 | text += f"Group: [{message.chat.title}]({link})\n"
36 | text += f"Group ID: `{message.chat.id}`\n"
37 |
38 | await bot.send_message(chat_id=LOG_CHANNEL,
39 | text=text,
40 | disable_web_page_preview=True,
41 | reply_markup=InlineKeyboardMarkup(
42 | [[InlineKeyboardButton("✅ Approve", callback_data=f"verify_approve_{message.chat.id}"),
43 | InlineKeyboardButton("❌ Decline", callback_data=f"verify_decline_{message.chat.id}")]]))
44 | await message.reply("💢 Verification Request sent ✅\n🔻 We will notify You Personally when it is approved ⭕")
45 |
46 |
47 | @Client.on_callback_query(filters.regex(r"^verify"))
48 | async def verify_(bot, update):
49 | id = int(update.data.split("_")[-1])
50 | group = await get_group(id)
51 | name = group["name"]
52 | user = group["user_id"]
53 | if update.data.split("_")[1]=="approve":
54 | await update_group(id, {"verified":True})
55 | await bot.send_message(chat_id=user, text=f"💢 Your verification request for {name} has been approved ✅")
56 | await update.message.edit(update.message.text.html.replace("#NewRequest", "#Approved"))
57 | else:
58 | await delete_group(id)
59 | await bot.send_message(chat_id=user, text=f"Your verification request for {name} has been declined 😐 Please Contact Admin")
60 | await update.message.edit(update.message.text.html.replace("#NewRequest", "#Declined"))
61 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | pyrofork
2 | tgcrypto
3 | motor[srv]
4 | cinemagoer
5 | aiohttp
6 | aiofiles
7 | asyncio
8 | psutil
9 | Flask==1.1.2
10 | gunicorn==20.1.0
11 | Jinja2==3.0.3
12 | werkzeug==2.0.2
13 | itsdangerous==2.0.1
14 |
--------------------------------------------------------------------------------
/run cmd.txt:
--------------------------------------------------------------------------------
1 | gunicorn app:app & python3 main.py
2 |
--------------------------------------------------------------------------------
/utils/TechVJ:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/utils/__init__.py:
--------------------------------------------------------------------------------
1 | # Don't Remove Credit Tg - @VJ_Botz
2 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
3 | # Ask Doubt on telegram @KingVJ01
4 |
5 | from .script import *
6 | from .helpers import *
7 |
--------------------------------------------------------------------------------
/utils/helpers.py:
--------------------------------------------------------------------------------
1 | # Don't Remove Credit Tg - @VJ_Botz
2 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
3 | # Ask Doubt on telegram @KingVJ01
4 |
5 | import asyncio
6 | from info import *
7 | from pyrogram import enums
8 | from imdb import Cinemagoer
9 | from pymongo.errors import DuplicateKeyError
10 | from pyrogram.errors import UserNotParticipant
11 | from motor.motor_asyncio import AsyncIOMotorClient
12 | from pyrogram.types import ChatPermissions, InlineKeyboardMarkup, InlineKeyboardButton
13 |
14 | dbclient = AsyncIOMotorClient(DATABASE_URI)
15 | db = dbclient["Channel-Filter"]
16 | grp_col = db["GROUPS"]
17 | user_col = db["USERS"]
18 | dlt_col = db["Auto-Delete"]
19 |
20 | ia = Cinemagoer()
21 |
22 | async def add_group(group_id, group_name, user_name, user_id, channels, f_sub, verified):
23 | data = {"_id": group_id, "name":group_name,
24 | "user_id":user_id, "user_name":user_name,
25 | "channels":channels, "f_sub":f_sub, "verified":verified}
26 | try:
27 | await grp_col.insert_one(data)
28 | except DuplicateKeyError:
29 | pass
30 |
31 | async def get_group(id):
32 | data = {'_id':id}
33 | group = await grp_col.find_one(data)
34 | return dict(group)
35 |
36 | async def update_group(id, new_data):
37 | data = {"_id":id}
38 | new_value = {"$set": new_data}
39 | await grp_col.update_one(data, new_value)
40 |
41 | async def delete_group(id):
42 | data = {"_id":id}
43 | await grp_col.delete_one(data)
44 |
45 | async def delete_user(id):
46 | data = {"_id":id}
47 | await user_col.delete_one(data)
48 |
49 | async def get_groups():
50 | count = await grp_col.count_documents({})
51 | cursor = grp_col.find({})
52 | list = await cursor.to_list(length=int(count))
53 | return count, list
54 |
55 | async def add_user(id, name):
56 | data = {"_id":id, "name":name}
57 | try:
58 | await user_col.insert_one(data)
59 | except DuplicateKeyError:
60 | pass
61 |
62 | async def get_users():
63 | count = await user_col.count_documents({})
64 | cursor = user_col.find({})
65 | list = await cursor.to_list(length=int(count))
66 | return count, list
67 |
68 | async def search_imdb(query):
69 | try:
70 | int(query)
71 | movie = ia.get_movie(query)
72 | return movie["title"]
73 | except:
74 | movies = ia.search_movie(query, results=10)
75 | list = []
76 | for movie in movies:
77 | title = movie["title"]
78 | try: year = f" - {movie['year']}"
79 | except: year = ""
80 | list.append({"title":title, "year":year, "id":movie.movieID})
81 | return list
82 |
83 | async def force_sub(bot, message):
84 | group = await get_group(message.chat.id)
85 | f_sub = group["f_sub"]
86 | admin = group["user_id"]
87 | if f_sub==False:
88 | return True
89 | if message.from_user is None:
90 | return True
91 | try:
92 | f_link = (await bot.get_chat(f_sub)).invite_link
93 | member = await bot.get_chat_member(f_sub, message.from_user.id)
94 | if member.status==enums.ChatMemberStatus.BANNED:
95 | await message.reply(f"ꜱᴏʀʀʏ {message.from_user.mention}!\n ʏᴏᴜ ᴀʀᴇ ʙᴀɴɴᴇᴅ ɪɴ ᴏᴜʀ ᴄʜᴀɴɴᴇʟ, ʏᴏᴜ ᴡɪʟʟ ʙᴇ ʙᴀɴɴᴇᴅ ꜰʀᴏᴍ ʜᴇʀᴇ ᴡɪᴛʜɪɴ 10 ꜱᴇᴄᴏɴᴅꜱ")
96 | await asyncio.sleep(10)
97 | await bot.ban_chat_member(message.chat.id, message.from_user.id)
98 | return False
99 | except UserNotParticipant:
100 | await bot.restrict_chat_member(chat_id=message.chat.id,
101 | user_id=message.from_user.id,
102 | permissions=ChatPermissions(can_send_messages=False)
103 | )
104 | await message.reply(f"🚫 ʜɪ ᴅᴇᴀʀ {message.from_user.mention}!\n\n ɪꜰ ʏᴏᴜ ᴡᴀɴᴛ ᴛᴏ ꜱᴇɴᴅ ᴍᴇꜱꜱᴀɢᴇ ɪɴ ᴛʜɪꜱ ɢʀᴏᴜᴘ.. ᴛʜᴇɴ ꜰɪʀꜱᴛ ʏᴏᴜ ʜᴀᴠᴇ ᴛᴏ ᴊᴏɪɴ ᴏᴜʀ ᴄʜᴀɴɴᴇʟ ᴛᴏ ᴍᴇꜱꜱᴀɢᴇ ʜᴇʀᴇ 💯",
105 | reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("✅ ᴊᴏɪɴ ᴄʜᴀɴɴᴇʟ ✅", url=f_link)],
106 | [InlineKeyboardButton("🌀 ᴛʀʏ ᴀɢᴀɪɴ 🌀", callback_data=f"checksub_{message.from_user.id}")]]))
107 | await message.delete()
108 | return False
109 | except Exception as e:
110 | await bot.send_message(chat_id=admin, text=f"❌ Error in Fsub:\n`{str(e)}`")
111 | return False
112 | else:
113 | return True
114 |
115 | async def broadcast_messages(user_id, message):
116 | try:
117 | await message.copy(chat_id=user_id)
118 | return True, "Success"
119 | except FloodWait as e:
120 | await asyncio.sleep(e.x)
121 | return await broadcast_messages(user_id, message)
122 | except InputUserDeactivated:
123 | await db.delete_user(int(user_id))
124 | logging.info(f"{user_id}-Removed from Database, since deleted account.")
125 | return False, "Deleted"
126 | except UserIsBlocked:
127 | logging.info(f"{user_id} -Blocked the bot.")
128 | return False, "Blocked"
129 | except PeerIdInvalid:
130 | await db.delete_user(int(user_id))
131 | logging.info(f"{user_id} - PeerIdInvalid")
132 | return False, "Error"
133 | except Exception as e:
134 | return False, "Error"
135 |
--------------------------------------------------------------------------------
/utils/script.py:
--------------------------------------------------------------------------------
1 | # Don't Remove Credit Tg - @VJ_Botz
2 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
3 | # Ask Doubt on telegram @KingVJ01
4 |
5 | class script(object):
6 | START = """**ʜᴇʟʟᴏ {} 🤟**
7 |
8 | ɪ ᴀᴍ ᴠᴊ ᴘᴏsᴛ sᴇᴀʀᴄʜ ʙᴏᴛ. ɪ ᴀᴍ ʙᴇsᴛ ᴄʜᴀɴɴᴇʟ ʟɪɴᴋ sᴇᴀʀᴄʜ ʙᴏᴛ!
9 | ɪ ᴡɪʟʟ ғɪʟᴛᴇʀ ʏᴏᴜʀ ᴄʜᴀɴɴᴇʟ ᴘᴏsᴛs ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ᴀɴᴅ sᴇɴᴅ ɪᴛ ɪɴ ʏᴏᴜʀ ɢʀᴏᴜᴘ ᴄʜᴀᴛ ᴡʜᴇɴ sᴏᴍᴇᴏɴᴇ sᴇᴀʀᴄʜ ɪᴛ."""
10 |
11 | HELP = """💢 ʜᴏᴡ ᴛᴏ ᴜsᴇ ᴍᴇ ɪɴ ᴀ ɢʀᴏᴜᴘ
12 |
13 | 🔻 ᴀᴅᴅ ᴍᴇ ɪɴ ʏᴏᴜʀ ɢʀᴏᴜᴘ & ᴄʜᴀɴɴᴇʟ ᴡɪᴛʜ ᴀʟʟ ᴘᴇʀᴍɪssɪᴏɴs.
14 | 🔻 sᴇɴᴅ /verify ɪɴ ɢʀᴏᴜᴘ & ᴡᴀɪᴛ ғᴏʀ ɪᴛ ᴛᴏ ᴀᴄᴄᴇᴘᴛ ᴏʀ ᴅɪʀᴇᴄᴛʟʏ ᴄᴏɴᴛᴀᴄᴛ ᴛᴏ ᴏᴡɴᴇʀ ᴀғᴛᴇʀ ʀᴇǫᴜᴇsᴛ @VJBots_bot.
15 | 🔻 ᴀғᴛᴇʀ ᴠᴇʀɪғɪᴄᴀᴛɪᴏɴ sᴇɴᴅ /connect ʏᴏᴜʀᴄʜᴀɴɴᴇʟɪᴅ. ( ғᴏʀ ᴍᴜʟᴛɪᴘʟᴇ ᴄʜᴀɴɴᴇʟs ᴜsᴇ ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ ᴍᴜʟᴛɪᴘʟᴇ ᴛɪᴍᴇs )
16 | 🔻 ᴇxᴀᴍᴘʟᴇ : /connect -100xxxxxxxxxx
17 |
18 | ⭕ ғᴏʀ ғᴏʀᴄᴇ sᴜʙsᴄʀɪʙᴇ ᴜsᴇ
19 | /fsub (ғsᴜʙɪᴅ)
20 | 🔻 ᴅɪsᴄᴏɴɴᴇᴄᴛ ʙʏ /nofsub (ғsᴜʙɪᴅ)
21 |
22 | ❣️ ɢᴇᴛ ᴄʜᴀɴɴᴇʟ ɪᴅ ʙʏ ᴄᴏᴍᴍᴀɴᴅ - /id
23 | ❣️ ʀᴇᴍᴏᴠᴇ ᴀ ᴄʜᴀɴɴᴇʟ ᴡɪᴛʜ - /disconnect -100xxxxxxxxxxx
24 | ᴛʜɪs ᴡɪʟʟ ʜᴇʟᴘ ʏᴏᴜ ᴛᴏ ʀᴇᴍᴏᴠᴇ ᴀ ɪɴᴅᴇxᴇᴅ ᴄʜᴀɴɴᴇʟ ғʀᴏᴍ ʏᴏᴜʀ ɢʀᴏᴜᴘ.
25 |
26 | ♨️ ɢᴇᴛ ᴄᴏɴɴᴇᴄᴛᴇᴅ ᴄʜᴀɴɴᴇʟs ʟɪsᴛ ᴡɪᴛʜ - /connections"""
27 |
28 | ABOUT = """╭━━━━━━━❰ [𝙰𝙱𝙾𝚄𝚃](https://t.me/VJ_Botz) ❱━━━━━━━➣
29 |
30 | ┣ ✯ Mʏ Nᴀᴍᴇ: {}
31 | ┣ ✯ Cʀᴇᴀᴛᴏʀ: VJ Bᴏᴛᴢ
32 | ┣ ✯ Lᴀɴɢᴜᴀɢᴇ: Pʏᴛʜᴏɴ 3
33 | ┣ ✯ DᴀᴛᴀBᴀsᴇ: MᴏɴɢᴏDB"""
34 |
35 | STATS = """My Status 💫
36 |
37 | 👥 Users: {}
38 | 🧿 Groups: {}"""
39 |
40 | BROADCAST = """{}
41 |
42 | Total: `{}`
43 | Remaining: `{}`
44 | Success: `{}`
45 | Failed: `{}`"""
46 |
47 |
48 |
--------------------------------------------------------------------------------