feat: 添加了网页监控面板

This commit is contained in:
2024-03-19 00:27:40 +08:00
parent 51cb1a87b8
commit 3adc265876
23 changed files with 316 additions and 42 deletions

View File

@ -1,5 +1,8 @@
import nonebot
from nonebot.plugin import PluginMetadata
from src.utils.language import get_system_lang
from .loader import *
from .webdash import *
__author__ = "snowykami"
__plugin_meta__ = PluginMetadata(
@ -9,11 +12,8 @@ __plugin_meta__ = PluginMetadata(
homepage="https://github.com/snowykami/LiteyukiBot",
)
fastapi_app = nonebot.get_app()
from src.utils.config import config
@fastapi_app.get("/")
async def root():
return {
"message": "Hello LiteyukiBot!",
}
sys_lang = get_system_lang()
nonebot.logger.info(sys_lang.get("main.current_language", LANG=sys_lang.get("language.name")))
nonebot.logger.info(sys_lang.get("main.enable_webdash", URL=f"http://{config['nonebot']['host']}:{config['nonebot']['port']}"))