commit 7bc2192c402d9d4ea8046a794daa6a289e721dec Author: snowy Date: Sun Oct 1 20:38:47 2023 +0800 Update diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..1d3ed4c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.yml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..359bb530 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml diff --git a/.idea/Liteyuki.iml b/.idea/Liteyuki.iml new file mode 100644 index 00000000..d0876a78 --- /dev/null +++ b/.idea/Liteyuki.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..039d8061 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,41 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..105ce2da --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..87885112 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..a347d08c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/data/liteyuki/.keep b/data/liteyuki/.keep new file mode 100644 index 00000000..e69de29b diff --git a/main.py b/main.py new file mode 100644 index 00000000..c6f8f205 --- /dev/null +++ b/main.py @@ -0,0 +1,5 @@ +from src.start import * + +if __name__ == '__main__': + liteyuki = Liteyuki() + liteyuki.start() \ No newline at end of file diff --git a/plugins/.keep b/plugins/.keep new file mode 100644 index 00000000..e69de29b diff --git a/r.txt b/r.txt new file mode 100644 index 00000000..e69de29b diff --git a/resources/.keep b/resources/.keep new file mode 100644 index 00000000..e69de29b diff --git a/src/builtin/liteyuki_main/__init__.py b/src/builtin/liteyuki_main/__init__.py new file mode 100644 index 00000000..8e719c91 --- /dev/null +++ b/src/builtin/liteyuki_main/__init__.py @@ -0,0 +1,11 @@ +print( + '''\033[34m __ ______ ________ ________ __ __ __ __ __ __ ______ +/ | / |/ |/ |/ \ / |/ | / |/ | / |/ | +$$ | $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$ \ /$$/ $$ | $$ |$$ | /$$/ $$$$$$/ +$$ | $$ | $$ | $$ |__ $$ \/$$/ $$ | $$ |$$ |/$$/ $$ | +$$ | $$ | $$ | $$ | $$ $$/ $$ | $$ |$$ $$< $$ | +$$ | $$ | $$ | $$$$$/ $$$$/ $$ | $$ |$$$$$ \ $$ | +$$ |_____ _$$ |_ $$ | $$ |_____ $$ | $$ \__$$ |$$ |$$ \ _$$ |_ +$$ |/ $$ | $$ | $$ | $$ | $$ $$/ $$ | $$ |/ $$ | +$$$$$$$$/ $$$$$$/ $$/ $$$$$$$$/ $$/ $$$$$$/ $$/ $$/ $$$$$$/ \033[0m''' +) \ No newline at end of file diff --git a/src/builtin/liteyuki_plugin_manager/__init__.py b/src/builtin/liteyuki_plugin_manager/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/builtin/liteyuki_plugin_manager/plugin.py b/src/builtin/liteyuki_plugin_manager/plugin.py new file mode 100644 index 00000000..ce65073e --- /dev/null +++ b/src/builtin/liteyuki_plugin_manager/plugin.py @@ -0,0 +1 @@ +from nonebot import on_command \ No newline at end of file diff --git a/src/start.py b/src/start.py new file mode 100644 index 00000000..f5620214 --- /dev/null +++ b/src/start.py @@ -0,0 +1,30 @@ +import threading +import nonebot +import yaml + +config = yaml.safe_load(open('config.yml', encoding='UTF-8')) + +class Liteyuki: + def __init__(self, params=None): + if params is None: + params = dict() + params.update() + + + kwargs = { + 'port': 11451, + 'host': '127.0.0.1', + 'nickname': ['Liteyuki'], + } + kwargs.update(config.get('nonebot', {})) + kwargs.update(params) + self.liteyuki_main = threading.Thread(target=nonebot.run) + self.running_state = 1 + nonebot.init(**kwargs) + + def start(self): + self.liteyuki_main.start() + nonebot.load_plugin('src.builtin.liteyuki_main') + + def stop(self): + pass \ No newline at end of file