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
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM python:3.8-slim-buster
FROM python:3.10

RUN apt update && apt upgrade -y
RUN apt install git -y
COPY requirements.txt /requirements.txt

RUN cd /
RUN pip3 install -U pip && pip3 install -U -r requirements.txt
RUN mkdir /EvaMaria
WORKDIR /EvaMaria
COPY start.sh /start.sh
CMD ["/bin/bash", "/start.sh"]
RUN pip install -U pip && pip install -U -r requirements.txt
WORKDIR /app

COPY . .

CMD ["python", "bot.py"]
2 changes: 1 addition & 1 deletion Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class script(object):
HELP_TXT = """𝙷𝙴𝚈 {}
𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
ABOUT_TXT = """✯ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: <a href=https://t.me/TeamEvamaria>Team Eva Maria</a>
✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: <a href=https://t.me/Imajaatt>Jatt Hacker</a>
✯ 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
✯ 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
✯ 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
Expand Down
8 changes: 8 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
from typing import Union, Optional, AsyncGenerator
from pyrogram import types

from plugins.render import web_server
from aiohttp import web


class Bot(Client):

def __init__(self):
Expand All @@ -42,6 +46,10 @@ async def start(self):
self.username = '@' + me.username
logging.info(f"{me.first_name} with for Pyrogram v{__version__} (Layer {layer}) started on {me.username}.")
logging.info(LOG_STR)
app = web.AppRunner(await web_server())
await app.setup()
bind_address = "0.0.0.0"
await web.TCPSite(app, bind_address, 8080).start()

async def stop(self, *args):
await super().stop()
Expand Down
12 changes: 6 additions & 6 deletions info.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def is_enabled(value, default):
# Others
LOG_CHANNEL = int(environ.get('LOG_CHANNEL', 0))
SUPPORT_CHAT = environ.get('SUPPORT_CHAT', 'TeamEvamaria')
P_TTI_SHOW_OFF = is_enabled((environ.get('P_TTI_SHOW_OFF', "False")), False)
IMDB = is_enabled((environ.get('IMDB', "False")), False)
SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "False")), False)
CUSTOM_FILE_CAPTION = environ.get("CUSTOM_FILE_CAPTION", None)
P_TTI_SHOW_OFF = is_enabled((environ.get('P_TTI_SHOW_OFF', "True")), True)
IMDB = is_enabled((environ.get('IMDB', "True")), True)
SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "True")), True)
CUSTOM_FILE_CAPTION = environ.get("CUSTOM_FILE_CAPTION", "<code>{file_name}</code>\n\n┏━━━━•❅•°•❈•°•❅••━━━━┓\n✰👑 <b>𝐉𝐨𝐢𝐧  [ 𝙈𝙖𝙞𝙣 𝘾𝙝𝙖𝙣𝙣𝙚𝙡 ](https://t.me/pthan_Moviess)</b>  👑✰\n┗━━━━•❅•°•❈•°•❅•━━━━┛")
BATCH_FILE_CAPTION = environ.get("BATCH_FILE_CAPTION", CUSTOM_FILE_CAPTION)
IMDB_TEMPLATE = environ.get("IMDB_TEMPLATE", "<b>Query: {query}</b> \n‌‌‌‌IMDb Data:\n\n🏷 Title: <a href={url}>{title}</a>\n🎭 Genres: {genres}\n📆 Year: <a href={url}/releaseinfo>{year}</a>\n🌟 Rating: <a href={url}/ratings>{rating}</a> / 10")
LONG_IMDB_DESCRIPTION = is_enabled(environ.get("LONG_IMDB_DESCRIPTION", "False"), False)
Expand All @@ -65,8 +65,8 @@ def is_enabled(value, default):
LOG_STR += f"Your current IMDB template is {IMDB_TEMPLATE}"


SHORTENER_API = environ.get("SHORTENER_API", "JpGXQftImASQY61nnRJThoHvZ153")
SHORTENER_SITE = environ.get("SHORTENER_SITE", "tinyfy.in")
SHORTENER_API = environ.get("SHORTENER_API", "3d1a7d47944434c0663c069e8b73fcc04d1d19e7")
LONG_DROPLINK_URL = environ.get("LONG_DROPLINK_URL", False)



13 changes: 10 additions & 3 deletions plugins/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async def start(client, message):
if message.chat.type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
buttons = [
[
InlineKeyboardButton('🤖 Updates', url='https://t.me/TeamEvamaria')
InlineKeyboardButton('🤖 Updates', url='https://t.me/pthan_Moviess')
],
[
InlineKeyboardButton('ℹ️ Help', url=f"https://t.me/{temp.U_NAME}?start=help"),
Expand All @@ -45,7 +45,7 @@ async def start(client, message):
InlineKeyboardButton('➕ Add Me To Your Groups ➕', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
],[
InlineKeyboardButton('🔍 Search', switch_inline_query_current_chat=''),
InlineKeyboardButton('🤖 Updates', url='https://t.me/TeamEvamaria')
InlineKeyboardButton('🤖 Updates', url='https://t.me/pthan_Moviess')
],[
InlineKeyboardButton('ℹ️ Help', callback_data='help'),
InlineKeyboardButton('😊 About', callback_data='about')
Expand Down Expand Up @@ -91,7 +91,7 @@ async def start(client, message):
InlineKeyboardButton('➕ Add Me To Your Groups ➕', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
],[
InlineKeyboardButton('🔍 Search', switch_inline_query_current_chat=''),
InlineKeyboardButton('🤖 Updates', url='https://t.me/TeamEvamaria')
InlineKeyboardButton('🤖 Updates', url='https://t.me/pthan_Moviess')
],[
InlineKeyboardButton('ℹ️ Help', callback_data='help'),
InlineKeyboardButton('😊 About', callback_data='about')
Expand Down Expand Up @@ -245,7 +245,14 @@ async def start(client, message):
file_id=file_id,
caption=f_caption,
protect_content=True if pre == 'filep' else False,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton('♻️ 𝐉𝐨𝐢𝐧 𝙂𝙧𝙤𝙪𝙥 ', url="https://t.me/+ZONAmseBbjZoPdoq")
]
]
)
)


@Client.on_message(filters.command('channel') & filters.user(ADMINS))
Expand Down
17 changes: 12 additions & 5 deletions plugins/pm_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ async def next_page(bot, query):
InlineKeyboardButton("NEXT ⏩", callback_data=f"next_{req}_{key}_{n_offset}")
],
)
btn.insert(0, [
InlineKeyboardButton("🔹 How to download 🔹", url='https://t.me/Actor_Actores_collection/287')
])
try:
await query.edit_message_reply_markup(
reply_markup=InlineKeyboardMarkup(btn)
Expand Down Expand Up @@ -407,7 +410,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton('➕ Add Me To Your Groups ➕', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
], [
InlineKeyboardButton('🔍 Search', switch_inline_query_current_chat=''),
InlineKeyboardButton('🤖 Updates', url='https://t.me/TeamEvamaria')
InlineKeyboardButton('🤖 Updates', url='https://t.me/pthan_Moviess')
], [
InlineKeyboardButton('ℹ️ Help', callback_data='help'),
InlineKeyboardButton('😊 About', callback_data='about')
Expand Down Expand Up @@ -673,6 +676,9 @@ async def auto_filter(client, msg, spoll=False):
btn.append(
[InlineKeyboardButton(text="🗓 1/1", callback_data="pages")]
)
btn.insert(0, [
InlineKeyboardButton("🔹 How to download 🔹", url='https://t.me/Actor_Actores_collection/287')
])
imdb = await get_poster(search, file=(files[0]).file_name) if settings["imdb"] else None
TEMPLATE = settings['template']
if imdb:
Expand Down Expand Up @@ -711,8 +717,7 @@ async def auto_filter(client, msg, spoll=False):
cap = f"Here is what i found for your query {search}"
if imdb and imdb.get('poster'):
try:
await message.reply_photo(photo=imdb.get('poster'), caption=cap[:1024],
reply_markup=InlineKeyboardMarkup(btn))
await message.reply_photo(photo=imdb.get('poster'), caption=cap[:1024],reply_markup=InlineKeyboardMarkup(btn))
except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
pic = imdb.get('poster')
poster = pic.replace('.jpg', "._V1_UX360.jpg")
Expand Down Expand Up @@ -776,9 +781,11 @@ async def advantage_spell_chok(msg):
)
] for k, movie in enumerate(movielist)]
btn.append([InlineKeyboardButton(text="Close", callback_data=f'spolling#{user}#close_spellcheck')])
await msg.reply("I couldn't find anything related to that\nDid you mean any one of these?",
kb= await msg.reply("I couldn't find anything related to that\nDid you mean any one of these?",
reply_markup=InlineKeyboardMarkup(btn))

await asyncio.sleep(300)
await kb.delete()
await msg.delete()

async def manual_filters(client, message, text=False):
group_id = message.chat.id
Expand Down
12 changes: 12 additions & 0 deletions plugins/render.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from aiohttp import web

routes = web.RouteTableDef()

@routes.get("/", allow_head=True)
async def root_route_handler(request):
return web.json_response("Mᴋɴ Bᴏᴛᴢ")

async def web_server():
web_app = web.Application(client_max_size=30000000)
web_app.add_routes(routes)
return web_app
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ marshmallow==3.14.1
umongo==3.0.1
requests
bs4
imdbpy==2021.4.18
git+https://github.com/cinemagoer/cinemagoer
shortzy
12 changes: 0 additions & 12 deletions start.sh

This file was deleted.

6 changes: 3 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import shortzy
from pyrogram.errors import InputUserDeactivated, UserNotParticipant, FloodWait, UserIsBlocked, PeerIdInvalid
from info import LONG_DROPLINK_URL, SHORTENER_API, AUTH_CHANNEL, LONG_IMDB_DESCRIPTION, MAX_LIST_ELM
from imdb import IMDb
from imdb import Cinemagoer
import asyncio
from pyrogram.types import Message, InlineKeyboardButton
from pyrogram import enums
Expand All @@ -22,7 +22,7 @@
r"(\[([^\[]+?)\]\((buttonurl|buttonalert):(?:/{0,2})(.+?)(:same)?\))"
)

imdb = IMDb()
imdb = Cinemagoer()

BANNED = {}
SMART_OPEN = '“'
Expand Down Expand Up @@ -379,7 +379,7 @@ def humanbytes(size):

#shortzy

shortz = shortzy.Shortzy(SHORTENER_API, "shareus.in")
shortz = shortzy.Shortzy(SHORTENER_API, "omegalinks.in")
async def get_shortlink(link):
if SHORTENER_API:
if LONG_DROPLINK_URL =="True" or LONG_DROPLINK_URL is True:
Expand Down