mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-11 04:07:23 +08:00
✨ 联合黑名单支持
This commit is contained in:
parent
8fa0470187
commit
773137591f
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh">
|
<html lang="zh" xmlns="http://www.w3.org/1999/html">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Liteyuki Status</title>
|
<title>Liteyuki Status</title>
|
||||||
@ -33,6 +33,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template id="sub-info-template">
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
<div class="data-storage" id="data">{{ data | tojson }}</div>
|
<div class="data-storage" id="data">{{ data | tojson }}</div>
|
||||||
<div class="info-box" id="weather-info">
|
<div class="info-box" id="weather-info">
|
||||||
|
@ -7,7 +7,7 @@ import time
|
|||||||
import nonebot
|
import nonebot
|
||||||
|
|
||||||
__NAME__ = "LiteyukiBot"
|
__NAME__ = "LiteyukiBot"
|
||||||
__VERSION__ = "6.3.0" # 60201
|
__VERSION__ = "6.3.2" # 60201
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
25
main.py
25
main.py
@ -7,23 +7,26 @@ from liteyuki.utils.base.ly_api import liteyuki_api
|
|||||||
|
|
||||||
init()
|
init()
|
||||||
|
|
||||||
store_config: dict = common_db.first(StoredConfig(), default=StoredConfig()).config
|
if __name__ == "__mp_main__":
|
||||||
static_config = load_from_yaml("config.yml")
|
store_config: dict = common_db.first(StoredConfig(), default=StoredConfig()).config
|
||||||
store_config.update(static_config)
|
static_config = load_from_yaml("config.yml")
|
||||||
nonebot.init(**store_config)
|
store_config.update(static_config)
|
||||||
|
nonebot.init(**store_config)
|
||||||
|
|
||||||
adapters = [v11.Adapter, v12.Adapter]
|
adapters = [v11.Adapter, v12.Adapter]
|
||||||
driver = nonebot.get_driver()
|
driver = nonebot.get_driver()
|
||||||
|
|
||||||
for adapter in adapters:
|
for adapter in adapters:
|
||||||
driver.register_adapter(adapter)
|
driver.register_adapter(adapter)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
try:
|
try:
|
||||||
nonebot.load_plugin("liteyuki.liteyuki_main")
|
nonebot.load_plugin("liteyuki.liteyuki_main")
|
||||||
nonebot.load_from_toml("pyproject.toml")
|
nonebot.load_from_toml("pyproject.toml")
|
||||||
nonebot.run()
|
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
if not isinstance(e, KeyboardInterrupt):
|
if not isinstance(e, KeyboardInterrupt):
|
||||||
nonebot.logger.error(f"An error occurred: {e}, Bug will be reported automatically.")
|
nonebot.logger.error(f"An error occurred: {e}, Bug will be reported automatically.")
|
||||||
liteyuki_api.bug_report(str(e.__repr__()))
|
liteyuki_api.bug_report(str(e.__repr__()))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
from liteyuki.utils.base.reloader import Reloader
|
||||||
|
|
||||||
|
nonebot.run()
|
||||||
|
Loading…
Reference in New Issue
Block a user