From 7c00d65fd11ce107c611e5106bdc6ab0311f90de Mon Sep 17 00:00:00 2001 From: xtaodada Date: Wed, 1 Feb 2023 13:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20hotfix:=20apt=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagermaid/modules/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pagermaid/modules/plugin.py b/pagermaid/modules/plugin.py index 16f40a9..531249b 100644 --- a/pagermaid/modules/plugin.py +++ b/pagermaid/modules/plugin.py @@ -42,7 +42,7 @@ def update_version(plugin_name, version): @listener(is_plugin=False, outgoing=True, command="apt", need_admin=True, - diagnostics=False, + diagnostics=True, description=lang('apt_des'), parameters=lang('apt_parameters')) async def plugin(message: Message): @@ -206,14 +206,14 @@ async def plugin(message: Message): await message.edit(lang('apt_why_not_install_a_plugin')) return await plugin_manager.load_remote_plugins() - updated_plugins = await plugin_manager.update_all_remote_plugin() + updated_plugins = [i.name for i in await plugin_manager.update_all_remote_plugin() if i] if len(updated_plugins) == 0: await message.edit(f"{lang('apt_name')}\n\n" + lang("apt_loading_from_online_but_nothing_need_to_update")) else: message = await message.edit(lang("apt_loading_from_online_and_updating")) await message.edit( - f"{lang('apt_name')}\n\n" + lang("apt_reading_list") + "\n".join(updated_plugins) + f"{lang('apt_name')}\n\n" + lang("apt_reading_list") + "\n\n" + "、".join(updated_plugins) ) await reload_all() elif message.parameter[0] == "search":