mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-22 03:59:15 +00:00
🚑️ hotfix: apt update
This commit is contained in:
parent
86976aa01f
commit
7c00d65fd1
@ -42,7 +42,7 @@ def update_version(plugin_name, version):
|
|||||||
|
|
||||||
@listener(is_plugin=False, outgoing=True, command="apt",
|
@listener(is_plugin=False, outgoing=True, command="apt",
|
||||||
need_admin=True,
|
need_admin=True,
|
||||||
diagnostics=False,
|
diagnostics=True,
|
||||||
description=lang('apt_des'),
|
description=lang('apt_des'),
|
||||||
parameters=lang('apt_parameters'))
|
parameters=lang('apt_parameters'))
|
||||||
async def plugin(message: Message):
|
async def plugin(message: Message):
|
||||||
@ -206,14 +206,14 @@ async def plugin(message: Message):
|
|||||||
await message.edit(lang('apt_why_not_install_a_plugin'))
|
await message.edit(lang('apt_why_not_install_a_plugin'))
|
||||||
return
|
return
|
||||||
await plugin_manager.load_remote_plugins()
|
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:
|
if len(updated_plugins) == 0:
|
||||||
await message.edit(f"<b>{lang('apt_name')}</b>\n\n" +
|
await message.edit(f"<b>{lang('apt_name')}</b>\n\n" +
|
||||||
lang("apt_loading_from_online_but_nothing_need_to_update"))
|
lang("apt_loading_from_online_but_nothing_need_to_update"))
|
||||||
else:
|
else:
|
||||||
message = await message.edit(lang("apt_loading_from_online_and_updating"))
|
message = await message.edit(lang("apt_loading_from_online_and_updating"))
|
||||||
await message.edit(
|
await message.edit(
|
||||||
f"<b>{lang('apt_name')}</b>\n\n" + lang("apt_reading_list") + "\n".join(updated_plugins)
|
f"<b>{lang('apt_name')}</b>\n\n" + lang("apt_reading_list") + "\n\n" + "、".join(updated_plugins)
|
||||||
)
|
)
|
||||||
await reload_all()
|
await reload_all()
|
||||||
elif message.parameter[0] == "search":
|
elif message.parameter[0] == "search":
|
||||||
|
Loading…
Reference in New Issue
Block a user