Skip to content

Commit

Permalink
Fix shell module not replying to commands
Browse files Browse the repository at this point in the history
  • Loading branch information
l3v11 authored Oct 13, 2022
1 parent ed8bb1e commit 951e3e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bot/modules/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bot/modules/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('<b>Command executed</b>', parse_mode='MARKDOWN')
message.reply_text('<b>Command executed</b>', parse_mode='HTML')

shell_handler = CommandHandler(BotCommands.ShellCommand, shell,
filters=CustomFilters.owner_filter, run_async=True)
Expand Down

0 comments on commit 951e3e3

Please sign in to comment.