PagerMaid-Pyro/pagermaid/modules/update.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
537 B
Python
Raw Permalink Normal View History

2023-01-31 16:24:56 +00:00
from sys import exit
2022-05-23 12:40:30 +00:00
2023-01-31 16:24:56 +00:00
from pagermaid.common.update import update as update_function
from pagermaid.enums import Message
2022-05-23 12:40:30 +00:00
from pagermaid.listener import listener
from pagermaid.utils import lang, alias_command
2022-05-23 12:40:30 +00:00
2023-03-12 03:56:01 +00:00
@listener(
is_plugin=False,
outgoing=True,
command=alias_command("update"),
need_admin=True,
description=lang("update_des"),
parameters="<true/debug>",
)
2022-06-20 13:55:14 +00:00
async def update(message: Message):
2023-01-31 16:24:56 +00:00
await update_function(len(message.parameter) > 0)
2023-03-12 03:56:01 +00:00
await message.edit(lang("update_success"))
2022-06-08 03:18:21 +00:00
exit(0)