-
Notifications
You must be signed in to change notification settings - Fork 71
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 #117 from MxEmerson/master
- Loading branch information
Showing
8 changed files
with
18 additions
and
50 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
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,3 +1,10 @@ | ||
{ | ||
"python.formatting.provider": "autopep8" | ||
"[python]": { | ||
"diffEditor.ignoreTrimWhitespace": false, | ||
"editor.defaultFormatter": "ms-python.autopep8", | ||
"editor.formatOnType": true, | ||
"editor.formatOnSave": true | ||
}, | ||
"python.languageServer": "Pylance", | ||
"python.analysis.typeCheckingMode": "basic" | ||
} |
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,36 +1,15 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
import nonebot | ||
from nonebot.adapters.onebot.v11 import Adapter as ONEBOT_V11Adapter | ||
|
||
# Custom your logger | ||
# | ||
# from nonebot.log import logger, default_format | ||
# logger.add("error.log", | ||
# rotation="00:00", | ||
# diagnose=False, | ||
# level="ERROR", | ||
# format=default_format) | ||
|
||
# You can pass some keyword args config to init function | ||
|
||
nonebot.init() | ||
app = nonebot.get_asgi() | ||
|
||
driver = nonebot.get_driver() | ||
driver.register_adapter(ONEBOT_V11Adapter) | ||
|
||
|
||
# Please DO NOT modify this file unless you know what you are doing! | ||
# As an alternative, you should use command `nb` or modify `pyproject.toml` to load plugins | ||
nonebot.load_from_toml("pyproject.toml") | ||
|
||
# Modify some config / config depends on loaded configs | ||
# | ||
# config = driver.config | ||
# do something... | ||
|
||
|
||
if __name__ == "__main__": | ||
nonebot.logger.warning("Always use `nb run` to start the bot instead of manually running!") | ||
nonebot.run(app="__mp_main__:app") | ||
nonebot.run() |
This file was deleted.
Oops, something went wrong.
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
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
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
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