Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ We have to use Bot for Inline Search & Userbot for Searching in Channels. So bot
<details><summary><b>Deploy to Heroku</b></summary>
<p>
<br>
<a href="https://heroku.com/deploy?template=https://github.com/Cyniteofficial/MdiskSearchBot">
<a href="https://heroku.com/deploy?template=https://github.com/JayR1213/MdiskSearchBot1">
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy">
</a>
</p>
Expand Down
22 changes: 11 additions & 11 deletions configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,52 @@


class Config(object):
API_ID = int(os.environ.get("API_ID", 12345))
API_HASH = os.environ.get("API_HASH", "")
BOT_TOKEN = os.environ.get("BOT_TOKEN", "")
API_ID = int(os.environ.get("API_ID", “11484651”))
API_HASH = os.environ.get("API_HASH", "9d058bf3591ddba2870ea61836571eae")
BOT_TOKEN = os.environ.get("BOT_TOKEN", "5765769840:AAF3X6xQ6Hr15CR6rk4pG4Ymi2VaeVO14T0")
BOT_SESSION_NAME = os.environ.get("BOT_SESSION_NAME", "MdiskSearchBot")
USER_SESSION_STRING = os.environ.get("USER_SESSION_STRING", "")
CHANNEL_ID = int(os.environ.get("CHANNEL_ID", -100))
CHANNEL_ID = int(os.environ.get("CHANNEL_ID", -1001144412978))
BOT_USERNAME = os.environ.get("BOT_USERNAME")
BOT_OWNER = int(os.environ.get("BOT_OWNER"))
UPDATES_CHANNEL = os.environ.get("UPDATES_CHANNEL", None)
ABOUT_BOT_TEXT = """<b>This is Mdisk Search Bot.

🤖 My Name: <a href='https://t.me/cyniteofficial'>Mdisk Search Robot</a>
🤖 My Name: <a href='https://t.me/IPopcornSearch_bot'>I Popcorn Search Movie Bot</a>

📝 Language : <a href='https://www.python.org'> Python V3</a>

📚 Library: <a href='https://docs.pyrogram.org'> Pyrogram</a>

📡 Server: <a href='https://heroku.com'>Heroku</a>

👨‍💻 Created By: <a href='https://t.me/cyniteofficial'>Cynite</a></b>
👨‍💻 Created By: <a href='https://t.me/Jayesh_Rajput1'>Jayesh</a></b>
"""

ABOUT_HELP_TEXT = """<b>👨‍💻 Developer : <a href='https://t.me/cyniteofficial'>Click Me</a>
ABOUT_HELP_TEXT = """<b>👨‍💻 Developer : <a href='https://t.me/Jayesh_Rajput1'>Click Me</a>

If You Want Your Own Bot Like This Then You Can Contact Our Developer.</b>
"""

HOME_TEXT = """
<b>Hey! {}😅,

I'm Mdisk Search Robot.🤖</a>
I'm I Popcorn Search Movie Bot.🤖</a>

I Can Search 🔍 What You Want❗

<a>Made With ❤ By @Cyniteofficial</a></b>
<a>Made With ❤ By @Jayesh_Rajput1</a></b>
"""


START_MSG = """
<b>Hey! {}😅,

I'm Mdisk Search Robot.🤖</a>
I'm I Popcorn Search Movie Bot.🤖</a>

I Can Search 🔍 What You Want❗

<a>Made With ❤ By @Cyniteofficial</a></b>
<a>Made With ❤ By @Jayesh_Rajput1</a></b>
"""


46 changes: 23 additions & 23 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@

@Bot.on_message(filters.private & filters.command("start"))
async def start_handler(_, event: Message):
await event.reply_photo("https://telegra.ph/file/165941ae764a56d6d9c89.jpg",
await event.reply_photo("https://telegra.ph/file/0c8a9bb6d36c3c071dbee.jpg",
caption=Config.START_MSG.format(event.from_user.mention),
reply_markup=InlineKeyboardMarkup([
[InlineKeyboardButton("Our Channel", url="https://t.me/cynitemovies"),
InlineKeyboardButton("Creator", url="https://t.me/Cyniteofficial")],
[InlineKeyboardButton("Help", callback_data="Help_msg"),
InlineKeyboardButton("About", callback_data="About_msg")]]))
[InlineKeyboardButton("Our Channel 🍿", url="https://t.me/IPopcornchannel"),
InlineKeyboardButton("Our Group 🍿", url="https://t.me/iPopcornGroup")],
[InlineKeyboardButton("Help 😣", callback_data="Help_msg"),
InlineKeyboardButton("About", callback_data="About_msg")]]))

@Bot.on_message(filters.private & filters.command("help"))
async def help_handler(_, event: Message):

await event.reply_text(Config.ABOUT_HELP_TEXT.format(event.from_user.mention),
reply_markup=InlineKeyboardMarkup([
[InlineKeyboardButton("Our Channel", url="https://t.me/iP_Movies"),
InlineKeyboardButton("Our Group", url="https://t.me/iPopcornMovieGroup"),
InlineKeyboardButton("About", callback_data="About_msg")]
[InlineKeyboardButton("Our Channel 🍿", url="https://t.me/IPopcornchannel"),
InlineKeyboardButton("Our Group 🍿", url="https://t.me/iPopcornGroup"),
InlineKeyboardButton("About", callback_data="About_msg")]
])
)

Expand All @@ -51,16 +51,16 @@ async def inline_handlers(_, event: Message):
answers = f'**📂 Results For ➠ {event.text} \n\n▰▱▰▱▰▱▰▱▰▱▰▱▰▱\n➠ Type Only Movie Name With Correct Spelling.✍️\n➠ Add Year For Better Result.🗓️\n▰▱▰▱▰▱▰▱▰▱▰▱▰▱\n\n**'
async for message in User.search_messages(chat_id=Config.CHANNEL_ID, limit=50, query=event.text):
if message.text:
thumb = None
thumb = yes
f_text = message.text
msg_text = message.text.html
if "|||" in message.text:
f_text = message.text.split("|||", 1)[0]
msg_text = message.text.html.split("|||", 1)[0]
answers += f'**🍿 Title ➠ ' + '' + f_text.split("\n", 1)[0] + '' + '\n\n📜 About ➠ ' + '' + f_text.split("\n", 2)[-1] + ' \n\n▰▱▰▱▰▱▰▱▰▱▰▱▰▱\nLink Will Auto Delete In 60Sec...⏰\n▰▱▰▱▰▱▰▱▰▱▰▱▰▱\n\n**'
answers += f'**🍿 Title ➠ ' + '' + f_text.split("\n", 1)[0] + '' + '\n\n📜 About ➠ ' + '' + f_text.split("\n", 2)[-1] + ' \n\n▰▱▰▱▰▱▰▱▰▱▰▱▰▱\nLink Will Auto Delete In 180Sec...⏰\n▰▱▰▱▰▱▰▱▰▱▰▱▰▱\n\n**'
try:
msg = await event.reply_text(answers)
await asyncio.sleep(60)
await asyncio.sleep(180)
await event.delete()
await msg.delete()
except:
Expand All @@ -77,12 +77,12 @@ async def button(bot, cmd: CallbackQuery):
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("Our Channel", url="https://t.me/cyniteMovies"),
InlineKeyboardButton("Join", url="https://t.me/Technicalcynite")
InlineKeyboardButton("Our Channe 🍿", url="https://t.me/IPopcornchannel"),
InlineKeyboardButton("Join Group 🍿", url="https://t.me/iPopcornGroup")
],
[
InlineKeyboardButton("Creator", url="https://t.me/cyniteofficial"),
InlineKeyboardButton("Home", callback_data="gohome")
InlineKeyboardButton("Creator 🕵️‍♂️", url="https://t.me/Jayesh_Rajput1"),
InlineKeyboardButton("Home 🏠", callback_data="gohome")
]
]
),
Expand All @@ -95,12 +95,12 @@ async def button(bot, cmd: CallbackQuery):
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("About", callback_data="About_msg"),
InlineKeyboardButton("Our Channel", url="https://t.me/cyniteMovies")
InlineKeyboardButton("About", callback_data="About_msg"),
InlineKeyboardButton("Our Channel 🍿", url="https://t.me/IPopcornchannel")
],
[
InlineKeyboardButton("Owner", url="https://t.me/cyniteofficial"),
InlineKeyboardButton("Home", callback_data="gohome")
InlineKeyboardButton("Owner 🕵️‍♂️", url="https://t.me/Jayesh_Rajput1"),
InlineKeyboardButton("Home", callback_data="gohome")
]
]
),
Expand All @@ -113,12 +113,12 @@ async def button(bot, cmd: CallbackQuery):
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("Help", callback_data="Help_msg"),
InlineKeyboardButton("About", callback_data="About_msg")
InlineKeyboardButton("Help 😣", callback_data="Help_msg"),
InlineKeyboardButton("About", callback_data="About_msg")
],
[
InlineKeyboardButton("Support", url="https://t.me/cyniteofficial"),
InlineKeyboardButton("Channel", url="https://t.me/cynitemovies")
InlineKeyboardButton("Support", url="https://t.me/Jayesh_Rajput1"),
InlineKeyboardButton("Channel", url="https://t.me/IPopcornchannel")
]
]
),
Expand Down
1 change: 1 addition & 0 deletions run cmd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gunicorn app:app & python3 main.py