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
|
2022-05-23 12:40:30 +00:00
|
|
|
from pagermaid.listener import listener
|
2023-01-31 16:24:56 +00:00
|
|
|
from pagermaid.utils import lang, Message, 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)
|