From 951e3e3e3a73d0e7e4d7b79ca1deda9706357224 Mon Sep 17 00:00:00 2001 From: Levi <57452819+l3v11@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:20:28 +0600 Subject: [PATCH] Fix shell module not replying to commands --- bot/__init__.py | 4 +++- bot/modules/eval.py | 2 +- bot/modules/shell.py | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bot/__init__.py b/bot/__init__.py index ec546d30..b8b3968e 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -98,7 +98,9 @@ TELEGRAPH_ACCS = os.environ.get('TELEGRAPH_ACCS', '') TELEGRAPH_ACCS = 1 if len(TELEGRAPH_ACCS) == 0 else int(TELEGRAPH_ACCS) -INDEX_URL = os.environ.get('INDEX_URL', None).rstrip("/") +INDEX_URL = os.environ.get('INDEX_URL', '').rstrip("/") +if len(INDEX_URL) == 0: + INDEX_URL = None ARCHIVE_LIMIT = os.environ.get('ARCHIVE_LIMIT', '') ARCHIVE_LIMIT = None if len(ARCHIVE_LIMIT) == 0 else float(ARCHIVE_LIMIT) diff --git a/bot/modules/eval.py b/bot/modules/eval.py index 9456f787..8635641f 100644 --- a/bot/modules/eval.py +++ b/bot/modules/eval.py @@ -34,7 +34,7 @@ def send(msg, bot, update): bot.send_message( chat_id=update.effective_chat.id, text=f"`{msg}`", - parse_mode='MARKDOWN') + parse_mode='Markdown') def evaluate(update, context): bot = context.bot diff --git a/bot/modules/shell.py b/bot/modules/shell.py index 4fc91ca5..c6428ddf 100644 --- a/bot/modules/shell.py +++ b/bot/modules/shell.py @@ -31,9 +31,9 @@ def shell(update, context): reply_to_message_id=message.message_id, chat_id=message.chat_id) elif len(reply) != 0: - message.reply_text(reply, parse_mode='MARKDOWN') + message.reply_text(reply, parse_mode='HTML') else: - message.reply_text('Command executed', parse_mode='MARKDOWN') + message.reply_text('Command executed', parse_mode='HTML') shell_handler = CommandHandler(BotCommands.ShellCommand, shell, filters=CustomFilters.owner_filter, run_async=True)