-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from SK-415/dev
release v1.3.2
- Loading branch information
Showing
16 changed files
with
234 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
__pycache__/ | ||
.venv/ | ||
.vscode/ | ||
data/ | ||
go-cqhttp/ | ||
log/ | ||
test/ | ||
_test/ | ||
sk_bot/ | ||
_sk_bot/ | ||
out/ | ||
dist/ | ||
_demo/ | ||
# vscode | ||
.vscode | ||
|
||
.env | ||
.env.dev | ||
# python | ||
__pycache__ | ||
dist | ||
|
||
src/plugins/copyman.py | ||
src/plugins/test.py | ||
src/plugins/_copyman.py | ||
# docs | ||
node_modules | ||
.temp | ||
.cache | ||
.cache | ||
|
||
# haruka_bot | ||
data | ||
go-cqhttp | ||
logs | ||
test | ||
_test | ||
.env | ||
.env.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
from os import path | ||
|
||
import nonebot | ||
from nonebot.adapters.cqhttp import Bot | ||
from nonebot.log import default_format, logger | ||
|
||
|
||
logger.add( | ||
"logs/error.log", | ||
rotation="00:00", | ||
retention="1 week", | ||
diagnose=False, | ||
level="ERROR", | ||
format=default_format, | ||
encoding="utf-8", | ||
) | ||
|
||
nonebot.init() | ||
driver = nonebot.get_driver() | ||
driver.register_adapter('cqhttp', Bot) | ||
app = nonebot.get_asgi() | ||
|
||
nonebot.load_plugins("src/plugins") | ||
driver = nonebot.get_driver() | ||
driver.register_adapter("cqhttp", Bot) | ||
|
||
nonebot.load_from_toml("pyproject.toml") | ||
|
||
# Modify some config / config depends on loaded configs | ||
# | ||
# config = nonebot.get_driver().config | ||
# | ||
# config = driver.config | ||
# do something... | ||
|
||
logger.add(path.join('log', "error.log"), | ||
rotation="00:00", | ||
retention='1 week', | ||
diagnose=False, | ||
level="ERROR", | ||
format=default_format, | ||
encoding='utf-8' | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
nonebot.run(app="bot:app") | ||
nonebot.logger.warning("Always use `nb run` to start the bot instead of manually running!") | ||
nonebot.run(app="__mp_main__:app") |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
5c26f3c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: