mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-12-02 07:44:43 +08:00
Update
This commit is contained in:
commit
7bc2192c40
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
config.yml
|
3
.idea/.gitignore
vendored
Normal file
3
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
8
.idea/Liteyuki.iml
Normal file
8
.idea/Liteyuki.iml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
41
.idea/inspectionProfiles/Project_Default.xml
Normal file
41
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="color" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyBroadExceptionInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<value>
|
||||
<list size="16">
|
||||
<item index="0" class="java.lang.String" itemvalue="nonebot" />
|
||||
<item index="1" class="java.lang.String" itemvalue="keyvalue-sqlite" />
|
||||
<item index="2" class="java.lang.String" itemvalue="GitPython" />
|
||||
<item index="3" class="java.lang.String" itemvalue="pydantic" />
|
||||
<item index="4" class="java.lang.String" itemvalue="nonebot2" />
|
||||
<item index="5" class="java.lang.String" itemvalue="nonebot-adapter-onebot" />
|
||||
<item index="6" class="java.lang.String" itemvalue="nonebot-adapter-telegram" />
|
||||
<item index="7" class="java.lang.String" itemvalue="PyYAML" />
|
||||
<item index="8" class="java.lang.String" itemvalue="aiofiles" />
|
||||
<item index="9" class="java.lang.String" itemvalue="nonebot-adapter-github" />
|
||||
<item index="10" class="java.lang.String" itemvalue="psutil" />
|
||||
<item index="11" class="java.lang.String" itemvalue="gputil" />
|
||||
<item index="12" class="java.lang.String" itemvalue="nb-cli" />
|
||||
<item index="13" class="java.lang.String" itemvalue="nonebot_plugin_htmlrender" />
|
||||
<item index="14" class="java.lang.String" itemvalue="pillow" />
|
||||
<item index="15" class="java.lang.String" itemvalue="aiohttp" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ReassignedToPlainText" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
4
.idea/misc.xml
Normal file
4
.idea/misc.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (2)" project-jdk-type="Python SDK" />
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Liteyuki.iml" filepath="$PROJECT_DIR$/.idea/Liteyuki.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
0
data/liteyuki/.keep
Normal file
0
data/liteyuki/.keep
Normal file
5
main.py
Normal file
5
main.py
Normal file
@ -0,0 +1,5 @@
|
||||
from src.start import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
liteyuki = Liteyuki()
|
||||
liteyuki.start()
|
0
plugins/.keep
Normal file
0
plugins/.keep
Normal file
0
resources/.keep
Normal file
0
resources/.keep
Normal file
11
src/builtin/liteyuki_main/__init__.py
Normal file
11
src/builtin/liteyuki_main/__init__.py
Normal file
@ -0,0 +1,11 @@
|
||||
print(
|
||||
'''\033[34m __ ______ ________ ________ __ __ __ __ __ __ ______
|
||||
/ | / |/ |/ |/ \ / |/ | / |/ | / |/ |
|
||||
$$ | $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$ \ /$$/ $$ | $$ |$$ | /$$/ $$$$$$/
|
||||
$$ | $$ | $$ | $$ |__ $$ \/$$/ $$ | $$ |$$ |/$$/ $$ |
|
||||
$$ | $$ | $$ | $$ | $$ $$/ $$ | $$ |$$ $$< $$ |
|
||||
$$ | $$ | $$ | $$$$$/ $$$$/ $$ | $$ |$$$$$ \ $$ |
|
||||
$$ |_____ _$$ |_ $$ | $$ |_____ $$ | $$ \__$$ |$$ |$$ \ _$$ |_
|
||||
$$ |/ $$ | $$ | $$ | $$ | $$ $$/ $$ | $$ |/ $$ |
|
||||
$$$$$$$$/ $$$$$$/ $$/ $$$$$$$$/ $$/ $$$$$$/ $$/ $$/ $$$$$$/ \033[0m'''
|
||||
)
|
0
src/builtin/liteyuki_plugin_manager/__init__.py
Normal file
0
src/builtin/liteyuki_plugin_manager/__init__.py
Normal file
1
src/builtin/liteyuki_plugin_manager/plugin.py
Normal file
1
src/builtin/liteyuki_plugin_manager/plugin.py
Normal file
@ -0,0 +1 @@
|
||||
from nonebot import on_command
|
30
src/start.py
Normal file
30
src/start.py
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user