Minor chmages

Signed-off-by: anasty17 <e.anastayyar@gmail.com>
This commit is contained in:
anasty17 2022-05-22 15:57:52 +03:00
parent c559bf5050
commit a9b154610b
3 changed files with 11 additions and 8 deletions

View File

@ -23,7 +23,7 @@ This is a Telegram Bot written in Python for mirroring files on the Internet to
- Mirror/Leech/Watch/Clone/Count/Del by reply
- YT-DLP quality buttons
- Search on torrents with Torrent Search API or with variable plugins using qBittorrent search engine
- Docker image support for linux `amd64, arm64, arm/v7, arm/v6, ppc64le, s390x, arm64/v8` (**Note**: Use `anasty17/mltb:arm64` for `arm64/v8` or oracle)
- Docker image support for linux `amd64, arm64, arm/v7, arm/v6, s390x, arm64/v8` (**Note**: Use `anasty17/mltb:arm64` for `arm64/v8` or oracle)
- Update bot at startup and with restart command using `UPSTREAM_REPO`
- Qbittorrent seed until reaching specific ratio or time
- Rss feed and filter. Based on this repository [rss-chan](https://github.com/hyPnOtICDo0g/rss-chan)

View File

@ -47,5 +47,8 @@ class _BotCommands:
self.RssSubCommand = f'rsssub{CMD_INDEX}'
self.RssUnSubCommand = f'rssunsub{CMD_INDEX}'
self.RssSettingsCommand = f'rssset{CMD_INDEX}'
self.EvalCommand = f'eval{CMD_INDEX}'
self.ExecCommand = f'exec{CMD_INDEX}'
self.ClearLocalsCommand = f'clearlocals{CMD_INDEX}'
BotCommands = _BotCommands()

View File

@ -113,18 +113,18 @@ def clear(update, context):
send("Cleared locals.", bot, update)
def exechelp(update, context):
help_string = '''
help_string = f'''
<b>Executor</b>
/eval <i>Run Python Code Line | Lines</i>
/exec <i>Run Commands In Exec</i>
/clearlocals <i>Cleared locals</i>
{BotCommands.EvalCommand} <i>Run Python Code Line | Lines</i>
{BotCommands.ExecCommand} <i>Run Commands In Exec</i>
{BotCommands.ClearLocalsCommand} <i>Cleared locals</i>
'''
sendMessage(help_string, context.bot, update.message)
EVAL_HANDLER = CommandHandler(('eval'), evaluate, filters=CustomFilters.owner_filter, run_async=True)
EXEC_HANDLER = CommandHandler(('exec'), execute, filters=CustomFilters.owner_filter, run_async=True)
CLEAR_HANDLER = CommandHandler('clearlocals', clear, filters=CustomFilters.owner_filter, run_async=True)
EVAL_HANDLER = CommandHandler(BotCommands.EvalCommand, evaluate, filters=CustomFilters.owner_filter, run_async=True)
EXEC_HANDLER = CommandHandler(BotCommands.ExecCommand, execute, filters=CustomFilters.owner_filter, run_async=True)
CLEAR_HANDLER = CommandHandler(BotCommands.ClearLocalsCommand, clear, filters=CustomFilters.owner_filter, run_async=True)
EXECHELP_HANDLER = CommandHandler(BotCommands.ExecHelpCommand, exechelp, filters=CustomFilters.owner_filter, run_async=True)
dispatcher.add_handler(EVAL_HANDLER)