Skip to content

Commit

Permalink
Improve listkeys module
Browse files Browse the repository at this point in the history
  • Loading branch information
l3v11 committed May 29, 2022
1 parent 7840797 commit feb9cb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ def get_config(name: str):
DRIVE_NAMES = []
DRIVE_IDS = []
INDEX_URLS = []
DEST_KEYS = []
TELEGRAPH = []
DEST_DRIVES = {}

AUTHORIZED_CHATS = set()
DEST_DRIVES = dict()

download_dict_lock = Lock()
status_reply_dict_lock = Lock()
Expand Down Expand Up @@ -249,7 +248,6 @@ def get_config(name: str):
for line in lines:
line = line.strip().split()
DEST_DRIVES[line[0]] = line[1:]
DEST_KEYS.append(line[0].replace("_", " "))

def create_account(sname):
try:
Expand Down
4 changes: 2 additions & 2 deletions bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from telegram import InlineKeyboardMarkup
from telegram.ext import CommandHandler

from bot import LOGGER, botStartTime, AUTHORIZED_CHATS, DEST_KEYS, TELEGRAPH, dispatcher, updater
from bot import LOGGER, botStartTime, AUTHORIZED_CHATS, DEST_DRIVES, TELEGRAPH, dispatcher, updater
from bot.modules import auth, cancel, clone, count, delete, eval, list, permission, shell, status
from bot.helper.ext_utils.bot_utils import get_readable_file_size, get_readable_time
from bot.helper.telegram_helper.bot_commands import BotCommands
Expand All @@ -25,7 +25,7 @@ def start(update, context):

def listkeys(update, context):
keys = ''
keys += '\n'.join(f"• <code>{key}</code>" for key in DEST_KEYS)
keys += '\n'.join(f"• <code>{key}</code>" for key in DEST_DRIVES.keys())
msg = f"<b><u>Available Keys</u></b>\n{keys}"
sendMessage(msg, context.bot, update.message)

Expand Down

0 comments on commit feb9cb7

Please sign in to comment.