PagerMaid-Pyro/pagermaid/modules/update.py
xtaodada a941308d17
Some checks failed
Docker Dev Build / docker build and publish (push) Failing after 13s
Docker Build / docker build and publish (push) Failing after 11s
🔖 Update to v1.5.0
这是一项破坏性变更,目录结构进行了重组,无核心功能变化
2024-09-28 22:01:40 +08:00

21 lines
537 B
Python

from sys import exit
from pagermaid.common.update import update as update_function
from pagermaid.enums import Message
from pagermaid.listener import listener
from pagermaid.utils import lang, alias_command
@listener(
is_plugin=False,
outgoing=True,
command=alias_command("update"),
need_admin=True,
description=lang("update_des"),
parameters="<true/debug>",
)
async def update(message: Message):
await update_function(len(message.parameter) > 0)
await message.edit(lang("update_success"))
exit(0)