Skip to content

Commit 4d701b1

Browse files
committed
update
1 parent 9a6d13e commit 4d701b1

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

docs/tutorial/hello-world.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
会有一个 `setting.yml` 文件, 文件内容可能如下:
1313

1414
``` yml
15-
APIKey: fafvasdfe4aht7iuklu
15+
authKey: AAAAAAAA
1616
port: 8080
17+
enableWebsocket: true #ws模式开关
1718
```
1819
1920
将字段 `APIKey` 和 `port` 的值记下, 然后下一步.
@@ -63,7 +64,7 @@ $ python setup.py install
6364
出于使任何人理解的目的, 我会带着你一一解析我们提供的 API .
6465

6566
::: tip
66-
由于本文档更新时, `python-mirai` 已经发布了 `0.2.1`,
67+
由于本文档更新时, `python-mirai` 已经发布了 `0.2.10`,
6768
故我们将转为介绍 `Application`, 同时 `Session` 将作为 `addForeverTarget` 的备选方案.
6869
:::
6970

@@ -73,13 +74,9 @@ $ python setup.py install
7374
from mirai import Mirai, Plain, MessageChain, Group
7475
import asyncio
7576
76-
from environment import (
77-
qq, # 字段 qq 的值
78-
authKey, # 字段 authKey 的值
79-
mirai_api_http_locate # = f"{httpapi所在主机的IP, 需有效!}:{字段 port 的值}"
80-
)
81-
# 上面是把我们之前记住的各种信息导入到程序中来, 属于伪代码,
82-
# 请不要在真实环境中填入!!!!!!
77+
qq = 123456 # 字段 qq 的值
78+
authKey = 'abcdefg' # 字段 authKey 的值
79+
mirai_api_http_locate = '127.0.0.1:8080' # httpapi所在主机的IP, 需有效!:字段 port 的值
8380
8481
app = Mirai(f"mirai://{mirai_api_http_locate}/?authKey={authKey}&qq={qq}")
8582

0 commit comments

Comments
 (0)