Skip to content

Commit

Permalink
Merge pull request #92 from SK-415/dev
Browse files Browse the repository at this point in the history
release v1.3.2
  • Loading branch information
SK-415 authored Sep 28, 2021
2 parents 1289346 + b16949c commit 5c26f3c
Show file tree
Hide file tree
Showing 16 changed files with 234 additions and 654 deletions.
35 changes: 16 additions & 19 deletions .gitignore
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
35 changes: 18 additions & 17 deletions bot.py
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")
152 changes: 0 additions & 152 deletions docs/.vuepress/components/Messenger.vue

This file was deleted.

Loading

1 comment on commit 5c26f3c

@vercel
Copy link

@vercel vercel bot commented on 5c26f3c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.