Initial commit
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
import nonebot
|
||||
from nonebot import require
|
||||
|
||||
require("nonebot_plugin_apscheduler")
|
||||
|
||||
from pathlib import Path
|
||||
from nonebot_plugin_apscheduler import scheduler
|
||||
|
||||
from .config import pconfig
|
||||
from .lib import rlib
|
||||
from .sync import sync
|
||||
|
||||
driver = nonebot.get_driver()
|
||||
|
||||
|
||||
@driver.on_startup
|
||||
def startup():
|
||||
if pconfig.proxy:
|
||||
rlib.set_proxy(pconfig.proxy)
|
||||
if pconfig.github_token:
|
||||
rlib.set_ghp(pconfig.github_token)
|
||||
rlib.boot(str(Path.cwd()), "nonebot_plugin_sekai_update_notify", pconfig.assets_studio_path)
|
||||
scheduler.add_job(sync, "interval", seconds=10, id="sekai_update_sync", replace_existing=True)
|
||||
Reference in New Issue
Block a user