diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..27bc52c
--- /dev/null
+++ b/.gitignore
@@ -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
diff --git a/Script.py b/Script.py
index d678d4d..4226782 100644
--- a/Script.py
+++ b/Script.py
@@ -1,10 +1,10 @@
class script(object):
START_TXT = """๐ท๐ด๐ป๐พ {},
-๐ผ๐ ๐ฝ๐ฐ๐ผ๐ด ๐ธ๐ {},\n\n ๏ฟฝ ๐ฒ๐ฐ๐ฝ ๐ฟ๐๐พ๐
๐ธ๐ณ๐ด ๐ผ๐พ๐
๐ธ๐ด๐, ๐น๐๐๐ ๐ฐ๐ณ๐ณ ๐ผ๐ด ๐๐พ ๐๐พ๐๐ ๐ถ๐๐พ๐๐ฟ ๐ฐ๐ฝ๐ณ ๐ด๐ฝ๐น๐พ๐ ๐ \n\n..."""
+๐ผ๐ ๐ฝ๐ฐ๐ผ๐ด ๐ธ๐ {},\n\n ๏ฟฝ ๐ฒ๐ฐ๐ฝ ๐ฟ๐๐พ๐
๐ธ๐ณ๐ด ๐ผ๐พ๐
๐ธ๐ด๐, ๐น๐๐๐ ๐ฐ๐ณ๐ณ ๐ผ๐ด ๐๐พ ๐๐พ๐๐ ๐ถ๐๐พ๐๐ฟ ๐ฐ๐ฝ๐ณ ๐ด๐ฝ๐น๐พ๐ ๐ \n @LISA_ROBOT"""
HELP_TXT = """๐ท๐ด๐ {}
Here is the help for my COMMANDS."""
ABOUT_TXT = """โฏ ๐ผ๐ ๐ฝ๐ฐ๐ผ๐ด: {}
-โฏ ๐ฒ๐๐ด๐ฐ๐๐พ๐: Adwin
+โฏ ๐ฒ๐๐ด๐ฐ๐๐พ๐: Adwin
โฏ ๐ป๐ธ๐ฑ๐๐ฐ๐๐: ๐ฟ๐๐๐พ๐ถ๐๐ฐ๐ผ
โฏ ๐ป๐ฐ๐ฝ๐ถ๐๐ฐ๐ถ๐ด: ๐ฟ๐๐๐ท๐พ๐ฝ ๐น
โฏ ๐ณ๐ฐ๐๐ฐ ๐ฑ๐ฐ๐๐ด: ๐ผ๐พ๐ฝ๐ถ๐พ ๐ณ๐ฑ
@@ -12,13 +12,13 @@ class script(object):
โฏ ๐ฑ๐๐ธ๐ป๐ณ ๐๐๐ฐ๐๐๐: v1.0.1 [ ๐ฑ๐ด๐๐ฐ ]"""
SOURCE_TXT = """NOTE:
- This Bot is an open source project.
-- Source - https://github.com/Private-Botz/Elsa-Bot
+- Source - https://github.com/CodeHouse-TG/Elsa-Bot
DEVS:
- Archive_codes"""
MANUELFILTER_TXT = """Help: Filters
-- 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
NOTE:
1. BOT should have admin privillage.
@@ -40,7 +40,7 @@ class script(object):
3. Buttons should be properly parsed as markdown format
URL buttons:
-[Button Text](buttonurl:https://t.me/Private_Botz)
+[Button Text](buttonurl:https://t.me/CodeHouse_TG)
Alert buttons:
[Button Text](buttonalert:This is an alert message)"""
diff --git a/plugins/commands.py b/plugins/commands.py
index 0305a85..16014d4 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -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')
@@ -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')
@@ -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.')
diff --git a/plugins/inline.py b/plugins/inline.py
index 4ba9af3..faa2a3f 100644
--- a/plugins/inline.py
+++ b/plugins/inline.py
@@ -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
@@ -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
@@ -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:
@@ -108,6 +109,3 @@ def get_reply_markup(query):
]
return InlineKeyboardMarkup(buttons)
-
-
-
diff --git a/plugins/p_ttishow.py b/plugins/p_ttishow.py
index 1b2140e..48549ad 100644
--- a/plugins/p_ttishow.py
+++ b/plugins/p_ttishow.py
@@ -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(
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 9ebf790..40c5001 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -127,7 +127,7 @@ async def advantage_spoll_choker(bot, query):
if not movies:
return await query.answer("You are clicking on an old button which is expired.", show_alert=True)
movie = movies[(int(movie_))]
- await query.answer('Checking for Movie in database...')
+ await query.answer('wait, Checking for Movie in database...')
k = await manual_filters(bot, query.message, text=movie)
if k == False:
files, offset, total_results = await get_search_results(movie, offset=0, filter=True)
@@ -157,20 +157,20 @@ async def cb_handler(client: Client, query: CallbackQuery):
title = chat.title
except:
await query.message.edit_text("Make sure I'm present in your group!!", quote=True)
- return await query.answer('๐ Elsa Bot ๐')
+ return
else:
await query.message.edit_text(
"I'm not connected to any groups!\nCheck /connections or connect to any groups",
quote=True
)
- return await query.answer('๐ Elsa Bot ๐')
+ return
elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
grp_id = query.message.chat.id
title = query.message.chat.title
else:
- return await query.answer('๐ Elsa Bot ๐')
+ return
st = await client.get_chat_member(grp_id, userid)
if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
@@ -224,7 +224,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
reply_markup=keyboard,
parse_mode=enums.ParseMode.MARKDOWN
)
- return await query.answer('๐ Elsa Bot ๐')
+ return
elif "connectcb" in query.data:
await query.answer()
@@ -245,7 +245,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
)
else:
await query.message.edit_text('Some error occurred!!', parse_mode=enums.ParseMode.MARKDOWN)
- return await query.answer('๐ Elsa Bot ๐')
+ return
elif "disconnect" in query.data:
await query.answer()
@@ -268,7 +268,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
f"Some error occurred!!",
parse_mode=enums.ParseMode.MARKDOWN
)
- return await query.answer('๐ Elsa Bot ๐')
+ return
elif "deletecb" in query.data:
await query.answer()
@@ -286,7 +286,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
f"Some error occurred!!",
parse_mode=enums.ParseMode.MARKDOWN
)
- return await query.answer('โฅ๏ธ Elsa Bot โฅ๏ธ')
+ return
elif query.data == "backcb":
await query.answer()
@@ -297,7 +297,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
await query.message.edit_text(
"There are no active connections!! Connect to some groups first.",
)
- return await query.answer('โฅ๏ธ Elsa Bot โฅ๏ธ')
+ return
buttons = []
for groupid in groupids:
try:
@@ -366,7 +366,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
)
await query.answer('Check PM, I have sent files in pm', show_alert=True)
except UserIsBlocked:
- await query.answer('Unblock the bot mahn !', show_alert=True)
+ await query.answer('Unblock the bot man !', show_alert=True)
except PeerIdInvalid:
await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
except Exception as e:
@@ -404,10 +404,10 @@ async def cb_handler(client: Client, query: CallbackQuery):
await query.answer()
elif query.data == "start":
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')
@@ -418,7 +418,6 @@ async def cb_handler(client: Client, query: CallbackQuery):
reply_markup=reply_markup,
parse_mode=enums.ParseMode.HTML
)
- await query.answer('โฅ๏ธ Thank You LazyDeveloper โฅ๏ธ')
elif query.data == "help":
buttons = [[
InlineKeyboardButton('Manual Filter', callback_data='manuelfilter'),
@@ -428,7 +427,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton('Extra Mods', callback_data='extra')
], [
InlineKeyboardButton('๐ Home', callback_data='start'),
- InlineKeyboardButton('๐ฆ Status', callback_data='stats')
+ InlineKeyboardButton('๐ฎ Status', callback_data='stats')
]]
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_text(
@@ -438,8 +437,8 @@ async def cb_handler(client: Client, query: CallbackQuery):
)
elif query.data == "about":
buttons = [[
- InlineKeyboardButton('๐ Updates ๐ค', url='https://t.me/LazyDeveloper'),
- InlineKeyboardButton('โฅ๏ธ Source', callback_data='source')
+ InlineKeyboardButton('๐ Updates ๐ค', url='https://t.me/CodeHouse_TG'),
+ InlineKeyboardButton('โฅ๏ธ Source โฅ๏ธ', callback_data='source')
], [
InlineKeyboardButton('๐ Home', callback_data='start'),
InlineKeyboardButton('๐ Close', callback_data='close_data')
@@ -565,7 +564,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
if str(grp_id) != str(grpid):
await query.message.edit("Your Active Connection Has Been Changed. Go To /settings.")
- return await query.answer('โฅ๏ธ ELsa โฅ๏ธ')
+ return
if status == "True":
await save_group_settings(grpid, set_type, False)
@@ -612,7 +611,6 @@ async def cb_handler(client: Client, query: CallbackQuery):
]
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_reply_markup(reply_markup)
- await query.answer('โฅ๏ธ Elsa-Bot โฅ๏ธ')
async def auto_filter(client, msg, spoll=False):
@@ -708,7 +706,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f"Baby, Here is what i found for your query {search}"
+ 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],
@@ -764,8 +762,8 @@ async def advantage_spell_chok(msg):
movielist += [(re.sub(r'(\-|\(|\)|_)', '', i, flags=re.IGNORECASE)).strip() for i in gs_parsed]
movielist = list(dict.fromkeys(movielist)) # removing duplicates
if not movielist:
- k = await msg.reply("Hey {Mention} ! i coudn't found anything in your {query}, ๐คทโโ๏ธ!\nPlease check your spelling once again ๐คฆโโ๏ธ... or \n Discuss your problem with our admin here ๐ @MH_Feedback_bot ")
- await asyncio.sleep(8)
+ k = await msg.reply("I couldn't find anything related to that๐คทโโ๏ธ!\nPlease check your spelling once again ๐คฆโโ๏ธ... \n Report admin our admin here ๐ @MH_Feedback_bot ")
+ await asyncio.sleep(15)
await k.delete()
return
SPELL_CHECK[msg.id] = movielist
@@ -776,7 +774,7 @@ 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("Hey {Mention} ! i coudn't found anything in your {query}, ๐คทโโ๏ธ!\nPlease check your spelling once again ๐คฆโโ๏ธ... or \n Discuss your problem with our admin here ๐ @MH_Feedback_bot ",
+ await msg.reply("I couldn't find anything related to that๐คทโโ๏ธ!\nPlease check your spelling once again ๐คฆโโ๏ธ... \n Report admin our admin here ๐ @MH_Feedback_bot ",
reply_markup=InlineKeyboardMarkup(btn))