Add a tentative fix
This commit is contained in:
16
main.py
16
main.py
@@ -64,16 +64,16 @@ async def handle_menu(update: Update, context: ContextTypes.DEFAULT_TYPE) -> Non
|
||||
await query.edit_message_text("Choose an option:", reply_markup=main_menu_keyboard())
|
||||
|
||||
case 'status_downloading':
|
||||
torrent_api = context.bot_data.get("torrent_api", {})
|
||||
torrents = torrent_api.get_filtered_torrents("downloading")
|
||||
t_api = context.bot_data.get("torrent_api", {})
|
||||
torrents = t_api.get_filtered_torrents("downloading")
|
||||
|
||||
text = format_torrents(torrents)
|
||||
|
||||
await query.edit_message_text(text, reply_markup=torrents_menu_keyboard())
|
||||
|
||||
case 'status_active':
|
||||
torrent_api = context.bot_data.get("torrent_api", {})
|
||||
torrents = torrent_api.get_filtered_torrents("active")
|
||||
t_api = context.bot_data.get("torrent_api", {})
|
||||
torrents = t_api.get_filtered_torrents("active")
|
||||
|
||||
text = format_torrents(torrents)
|
||||
|
||||
@@ -81,16 +81,16 @@ async def handle_menu(update: Update, context: ContextTypes.DEFAULT_TYPE) -> Non
|
||||
|
||||
|
||||
case 'status_all':
|
||||
torrent_api = context.bot_data.get("torrent_api", {})
|
||||
torrents = torrent_api.get_filtered_torrents("all")
|
||||
t_api = context.bot_data.get("torrent_api", {})
|
||||
torrents = t__api.get_filtered_torrents("all")
|
||||
|
||||
text = format_torrents(torrents)
|
||||
|
||||
await query.edit_message_text(text, reply_markup=torrents_menu_keyboard())
|
||||
|
||||
case 'menu_status':
|
||||
kuma_api = context.bot_data.get("kuma_api", {})
|
||||
monitors = kuma_api.get_status()
|
||||
k_api = context.bot_data.get("kuma_api", {})
|
||||
monitors = k_api.get_status()
|
||||
|
||||
up_text, down_text, paused_text = "", "", ""
|
||||
for _, monitor in monitors.items():
|
||||
|
||||
Reference in New Issue
Block a user