diff --git a/README.md b/README.md index b0764d1beb..99b8faafc0 100644 --- a/README.md +++ b/README.md @@ -447,6 +447,7 @@ help - All cmds with description - `FSUB_IDS`: Fill chat_id(-100xxxxxx) of groups/channel you want to force subscribe. Separate them by space. Int - Note: Bot should be added in the filled chat_id as admin - `BOT_PM`: File/links send to the BOT PM. Default is `False`. `Bool` + - `BOT_MAX_TASKS`: Limit the Maximum task for bots of group at a time. `Int`
{self.message.reply_to_message.text}
"
elif self.source_url.startswith('https://t.me/share/url?url='):
msg = self.source_url.replace('https://t.me/share/url?url=', '')
if msg.startswith('magnet'):
@@ -111,10 +114,11 @@ def __parseSource(self):
elif check.startswith('magnet:?xt=urn:btih:'):
hashh = check.replace('magnet:?xt=urn:btih:', '')
else:
- name += ('&' if amper else '') + check.replace("dn=", "")
+ name += ('&' if amper else '') + check.replace('dn=', '').replace('+', '')
amper = True
self.source_msg = f"┎ Name: {name}\n┠ Magnet Hash: {hashh}
\n┠ Total Trackers: {tracCount} \n┖ Share: Share To Telegram"
- else: self.source_msg = f"{msg}
"
+ else:
+ self.source_msg = f"{msg}
"
else:
self.source_msg = f"{self.source_url}
"
@@ -483,7 +487,7 @@ async def onUploadComplete(self, link, size, files, folders, mime_type, name, rc
if is_DDL:
buttons.ubutton(BotTheme('DDL_LINK', Serv='GoFile'), link)
elif link:
- if not config_dict['DISABLE_DRIVE_LINK'] and user_id == OWNER_ID:
+ if not config_dict['DISABLE_DRIVE_LINK'] and user_id != OWNER_ID:
buttons.ubutton(BotTheme('CLOUD_LINK'), link)
else:
msg += BotTheme('RCPATH', RCpath=rclonePath)
diff --git a/bot/helper/mirror_utils/upload_utils/pyrogramEngine.py b/bot/helper/mirror_utils/upload_utils/pyrogramEngine.py
index 5eae3409ad..eb7883695f 100644
--- a/bot/helper/mirror_utils/upload_utils/pyrogramEngine.py
+++ b/bot/helper/mirror_utils/upload_utils/pyrogramEngine.py
@@ -273,7 +273,7 @@ async def upload(self, o_files, m_size, size):
self.__last_uploaded = 0
await self.__switching_client()
await self.__upload_file(cap_mono, file_)
- if not isDeleted and config_dict['CLEAN_LOG_MSG']:
+ if self.__leechmsg and not isDeleted and config_dict['CLEAN_LOG_MSG']:
await list(self.__leechmsg.values())[0].delete()
isDeleted = True
if self.__is_cancelled:
diff --git a/bot/helper/telegram_helper/message_utils.py b/bot/helper/telegram_helper/message_utils.py
index f5b514d4d7..3db48d6c66 100644
--- a/bot/helper/telegram_helper/message_utils.py
+++ b/bot/helper/telegram_helper/message_utils.py
@@ -138,6 +138,8 @@ async def editMessage(message, text, buttons=None, photo=None):
return await editMessage(message, text, buttons, photo)
except (MessageNotModified, MessageEmpty):
pass
+ except ReplyMarkupInvalid:
+ return await editMessage(message, text, None, photo)
except Exception as e:
LOGGER.error(str(e))
return str(e)
@@ -328,4 +330,4 @@ async def BotPm_check(message, button=None):
button = ButtonMaker()
_msg = "You didn't START the bot in PM (Private)"
button.ubutton("Start Bot Now", f"https://t.me/{bot_name}?start=start", 'header')
- return _msg, button
\ No newline at end of file
+ return _msg, button
diff --git a/config_sample.env b/config_sample.env
index 767e3faf9a..572afaeb81 100644
--- a/config_sample.env
+++ b/config_sample.env
@@ -25,6 +25,7 @@ USE_SERVICE_ACCOUNTS = "False"
SET_COMMANDS = "False"
FSUB_IDS = ""
BOT_PM = ""
+BOT_MAX_TASKS = ""
# GDrive Tools
GDRIVE_ID = ""
@@ -46,7 +47,7 @@ RCLONE_SERVE_PASS = ""
UPSTREAM_REPO = ""
UPSTREAM_BRANCH = ""
-# Leech
+# Leech & Mirror
LEECH_SPLIT_SIZE = ""
AS_DOCUMENT = "False"
EQUAL_SPLITS = "False"
@@ -56,10 +57,14 @@ LEECH_FILENAME_PREFIX = ""
LEECH_FILENAME_SUFFIX = ""
LEECH_FILENAME_CAPTION = ""
LEECH_FILENAME_REMNAME = ""
+MIRROR_FILENAME_PREFIX = ""
+MIRROR_FILENAME_SUFFIX = ""
+MIRROR_FILENAME_REMNAME = ""
# Log Channel (Single ID)
LEECH_LOG_ID = ""
MIRROR_LOG_ID = ""
+LINKS_LOG_ID = ""
# qBittorrent/Aria2c
TORRENT_TIMEOUT = ""
@@ -107,6 +112,10 @@ AUTHOR_URL = "https://t.me/WZML_X"
# Extra
SAFE_MODE = ""
+DELETE_LINKS = ""
+CLEAN_LOG_MSG = ""
+SHOW_EXTRA_CMDS = ""
+SOURCE_LINK = ""
TIMEZONE = "Asia/Kolkata"
IMAGES = ""
IMG_SEARCH = ""