Skip to content

Commit

Permalink
chore: 更新vscode编辑与调试配置
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcoras committed Sep 17, 2024
1 parent a01dd0a commit a9c87bf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Nonebot",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/bot.py",
"console": "integratedTerminal",
Expand Down
9 changes: 8 additions & 1 deletion .vscode/settings.json
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"
}
15 changes: 15 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import nonebot
from nonebot.adapters.onebot.v11 import Adapter as ONEBOT_V11Adapter



nonebot.init()

driver = nonebot.get_driver()
driver.register_adapter(ONEBOT_V11Adapter)


nonebot.load_from_toml("pyproject.toml")

if __name__ == "__main__":
nonebot.run()

0 comments on commit a9c87bf

Please sign in to comment.