hyper-bot 0.82.0__tar.gz → 0.82.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/PKG-INFO +1 -1
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyper_bot.egg-info/PKG-INFO +1 -1
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/__init__.py +27 -3
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/LICENSE +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyper_bot.egg-info/SOURCES.txt +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyper_bot.egg-info/dependency_links.txt +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyper_bot.egg-info/requires.txt +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyper_bot.egg-info/top_level.txt +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/LecAdapters/Milky.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/LecAdapters/MilkyLib/Manager.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/LecAdapters/MilkyLib/Res.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/LecAdapters/MilkyLib/translator.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/LecAdapters/OneBot.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/LecAdapters/OneBotLib/Manager.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/LecAdapters/OneBotLib/Res.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/adapters/__init__.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/adapters/builtins.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/adapters/common.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/adapters/listener.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/adapters/obuilder.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/adapters/res.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/common.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/configurator.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/events.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/hyperogger.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/listener.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/network.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/segments.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/service.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/utils/ArkSignHelper.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/utils/apiresponse.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/utils/errors.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/utils/hypetyping.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/utils/logic.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/utils/screens.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/hyperot/utils/typextensions.py +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/setup.cfg +0 -0
- {hyper_bot-0.82.0 → hyper_bot-0.82.1}/setup.py +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import signal
|
|
2
|
-
from asyncio import tasks
|
|
3
|
-
|
|
4
2
|
from . import configurator
|
|
5
3
|
from .utils import screens
|
|
6
4
|
|
|
@@ -9,7 +7,7 @@ import asyncio
|
|
|
9
7
|
import sys
|
|
10
8
|
import os
|
|
11
9
|
|
|
12
|
-
HYPER_BOT_VERSION = "0.82.
|
|
10
|
+
HYPER_BOT_VERSION = "0.82.1"
|
|
13
11
|
|
|
14
12
|
# listener = None
|
|
15
13
|
|
|
@@ -93,3 +91,29 @@ class Client:
|
|
|
93
91
|
|
|
94
92
|
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
|
95
93
|
pass
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def init(cfg_file: str = "config.json") -> "hyperogger.Logger":
|
|
97
|
+
from cfgr.manager import Serializers
|
|
98
|
+
try:
|
|
99
|
+
configurator.BotConfig.load_from(cfg_file, Serializers.JSON, "hyper-bot")
|
|
100
|
+
except FileNotFoundError:
|
|
101
|
+
configurator.BotConfig.create_and_write(cfg_file, Serializers.JSON)
|
|
102
|
+
print("没有找到配置文件,已自动创建,请填写后重启")
|
|
103
|
+
exit(-1)
|
|
104
|
+
|
|
105
|
+
if True:
|
|
106
|
+
from hyperot import hyperogger
|
|
107
|
+
from hyperot.adapters import builtins as adp
|
|
108
|
+
|
|
109
|
+
config = configurator.BotConfig.get("hyper-bot")
|
|
110
|
+
logger = hyperogger.Logger()
|
|
111
|
+
logger.set_level(config.log_level)
|
|
112
|
+
|
|
113
|
+
match config.protocol:
|
|
114
|
+
case "OneBot":
|
|
115
|
+
adp.load_onebot()
|
|
116
|
+
case _:
|
|
117
|
+
raise NotImplementedError
|
|
118
|
+
|
|
119
|
+
return logger
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|