Skip to content
148 changes: 148 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Personal files
*.session
*.session-journal
.vscode
*test*.py
setup.cfg

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
config.py
.goutputstream-VAFWB1
result.json
10 changes: 5 additions & 5 deletions Script.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
class script(object):
START_TXT = """𝙷𝙴𝙻𝙾 {},
𝙼𝚈 𝙽𝙰𝙼𝙴 𝙸𝚂 <a href=https://t.me/{}>{}</a>,\n\n � 𝙲𝙰𝙽 𝙿𝚁𝙾𝚅𝙸𝙳𝙴 𝙼𝙾𝚅𝙸𝙴𝚂, 𝙹𝚄𝚂𝚃 𝙰𝙳𝙳 𝙼𝙴 𝚃𝙾 𝚈𝙾𝚄𝚁 𝙶𝚁𝙾𝚄𝙿 𝙰𝙽𝙳 𝙴𝙽𝙹𝙾𝚈 😍 \n\n..."""
𝙼𝚈 𝙽𝙰𝙼𝙴 𝙸𝚂 <a href=https://t.me/{}>{}</a>,\n\n � 𝙲𝙰𝙽 𝙿𝚁𝙾𝚅𝙸𝙳𝙴 𝙼𝙾𝚅𝙸𝙴𝚂, 𝙹𝚄𝚂𝚃 𝙰𝙳𝙳 𝙼𝙴 𝚃𝙾 𝚈𝙾𝚄𝚁 𝙶𝚁𝙾𝚄𝙿 𝙰𝙽𝙳 𝙴𝙽𝙹𝙾𝚈 😍 \n @LISA_ROBOT"""
HELP_TXT = """𝙷𝙴𝚈 {}
Here is the help for my COMMANDS."""
ABOUT_TXT = """✯ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: <a href=https://t.me/Private_botz>Adwin</a>
✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: <a href=https://t.me/adwin_mosses>Adwin</a>
✯ 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
✯ 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
✯ 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
✯ 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: Railway
✯ 𝙱𝚄𝙸𝙻𝙳 𝚂𝚃𝙰𝚃𝚄𝚂: v1.0.1 [ 𝙱𝙴𝚃𝙰 ]"""
SOURCE_TXT = """<b>NOTE:</b>
- This Bot is an open source project.
- Source - https://github.com/Private-Botz/Elsa-Bot
- Source - https://github.com/CodeHouse-TG/Elsa-Bot

<b>DEVS:</b>
- <a href=https://t.me/Private_Botz>Archive_codes</a>"""
MANUELFILTER_TXT = """Help: <b>Filters</b>

- Filter is the feature were users can set automated replies for a particular keyword and LazyPriness will respond whenever that keyword hits the message
- Filter is the feature were users can set automated replies for a particular keyword and Bot will respond whenever that keyword hits the message

<b>NOTE:</b>
1. BOT should have admin privillage.
Expand All @@ -40,7 +40,7 @@ class script(object):
3. Buttons should be properly parsed as markdown format

<b>URL buttons:</b>
<code>[Button Text](buttonurl:https://t.me/Private_Botz)</code>
<code>[Button Text](buttonurl:https://t.me/CodeHouse_TG)</code>

<b>Alert buttons:</b>
<code>[Button Text](buttonalert:This is an alert message)</code>"""
Expand Down
9 changes: 4 additions & 5 deletions plugins/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ async def start(client, message):
await client.send_message(LOG_CHANNEL, script.LOG_TEXT_P.format(message.from_user.id, message.from_user.mention))
if len(message.command) != 2:
buttons = [[
InlineKeyboardButton('➕↖️ Add Me To Your Groups ↗️➕', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
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/Private_Botz')
InlineKeyboardButton('🔔 Updates 🤖', url='https://t.me/CodeHouse_TG')
],[
InlineKeyboardButton('🙆🏻 Help 🦾', callback_data='help'),
InlineKeyboardButton('♥️ About ♥️', callback_data='about')
Expand Down Expand Up @@ -88,10 +88,10 @@ async def start(client, message):
return
if len(message.command) == 2 and message.command[1] in ["subscribe", "error", "okay", "help"]:
buttons = [[
InlineKeyboardButton('➕↖️ Add Me To Your Groups ↗️➕', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
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/Private_Botz')
InlineKeyboardButton('🔔 Updates 🤖', url='https://t.me/CodeHouse_TG')
],[
InlineKeyboardButton('🙆🏻 Help 🦾', callback_data='help'),
InlineKeyboardButton('♥️ About ♥️', callback_data='about')
Expand Down Expand Up @@ -360,7 +360,6 @@ async def delete_all_index(bot, message):
@Client.on_callback_query(filters.regex(r'^autofilter_delete'))
async def delete_all_index_confirm(bot, message):
await Media.collection.drop()
await message.answer('♥️ Thank You LazyDeveloper ♥️')
await message.message.edit('Succesfully Deleted All The Indexed Files.')


Expand Down
18 changes: 8 additions & 10 deletions plugins/inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
cache_time = 0 if AUTH_USERS or AUTH_CHANNEL else CACHE_TIME

async def inline_users(query: InlineQuery):
if AUTH_USERS:
if query.from_user and query.from_user.id in AUTH_USERS:
return True
else:
return False
if AUTH_USERS and query.from_user and query.from_user.id in AUTH_USERS:
return True
if query.from_user and query.from_user.id not in temp.BANNED_USERS:
return True
return False
Expand All @@ -26,14 +23,14 @@ async def answer(bot, query):
if not await inline_users(query):
await query.answer(results=[],
cache_time=0,
switch_pm_text='Results',
switch_pm_text='okDa',
switch_pm_parameter="hehe")
return

if AUTH_CHANNEL and not await is_subscribed(bot, query):
await query.answer(results=[],
cache_time=0,
switch_pm_text='You have to subscribe main channel to use the bot',
switch_pm_text='You have to subscribe my channel to use the bot',
switch_pm_parameter="subscribe")
return

Expand Down Expand Up @@ -88,6 +85,10 @@ async def answer(bot, query):
pass
except Exception as e:
logging.exception(str(e))
await query.answer(results=[], is_personal=True,
cache_time=cache_time,
switch_pm_text=str(e)[:63],
switch_pm_parameter="error")
else:
switch_pm_text = f'{emoji.CROSS_MARK} No results'
if string:
Expand All @@ -108,6 +109,3 @@ def get_reply_markup(query):
]
return InlineKeyboardMarkup(buttons)




2 changes: 1 addition & 1 deletion plugins/p_ttishow.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def save_group(bot, message):
return
buttons = [[
InlineKeyboardButton('🤥 Help', url=f"https://t.me/{temp.U_NAME}?start=help"),
InlineKeyboardButton('🔔 Updates', url='https://t.me/Private_Botz')
InlineKeyboardButton('🔔 Updates', url='https://t.me/COdeHouse_TG')
]]
reply_markup=InlineKeyboardMarkup(buttons)
await message.reply_text(
Expand Down
Loading