🐛 修复无法重启进程的问题(未启动生命监视器)
This commit is contained in:
18
src/liteyuki_plugins/scheduled_tasks/__init__.py
Normal file
18
src/liteyuki_plugins/scheduled_tasks/__init__.py
Normal file
@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
|
||||
|
||||
@Time : 2024/8/15 下午11:29
|
||||
@Author : snowykami
|
||||
@Email : snowykami@outlook.com
|
||||
@File : __init__.py.py
|
||||
@Software: PyCharm
|
||||
"""
|
||||
from liteyuki.plugin import PluginMetadata
|
||||
|
||||
from .divided_by_lifespan import *
|
||||
|
||||
__plugin_mata__ = PluginMetadata(
|
||||
name="计划任务",
|
||||
description="计划任务插件,一些杂项任务的计划执行。",
|
||||
)
|
@ -0,0 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
|
||||
|
||||
@Time : 2024/8/15 下午11:32
|
||||
@Author : snowykami
|
||||
@Email : snowykami@outlook.com
|
||||
@File : __init__.py
|
||||
@Software: PyCharm
|
||||
"""
|
@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
|
||||
|
||||
@Time : 2024/8/15 下午11:32
|
||||
@Author : snowykami
|
||||
@Email : snowykami@outlook.com
|
||||
@File : after_start.py
|
||||
@Software: PyCharm
|
||||
"""
|
||||
import time
|
||||
|
||||
from liteyuki import get_bot
|
||||
|
||||
liteyuki = get_bot()
|
||||
|
||||
|
||||
@liteyuki.on_after_start
|
||||
def save_startup_timestamp():
|
||||
"""
|
||||
储存启动的时间戳
|
||||
"""
|
||||
startup_timestamp = time.time()
|
Reference in New Issue
Block a user