Skip to content

Commit

Permalink
Merge pull request #1 from liaosunny123/main
Browse files Browse the repository at this point in the history
修正关于登录和消息链处的一些 BUG
  • Loading branch information
KusaGumina authored Mar 5, 2024
2 parents 33f5b05 + 3ebb80d commit a18c1b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/Lagrange.Core/Login/LoginByScanQrCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ var qrCode = await bot.FetchQrCode();

可以将二维码的byte[]保存为本地png文件扫码,也可以用二维码生成工具把Url生成为二维码交给手机扫描

::: tip 提示
二维码内容链接需要被转换为二维码图片后通过手机 App 扫码登录,不要直接访问链接。
:::

## 等待登陆

在获取完二维码后,等待异步方法LoginByQrCode(),该方法会等待用户扫码并在扫码完毕后返回

```csharp
await bot.LoginByQrCode();
```

::: tip 提示
如果你正在进行概念验证,运行完登陆后程序不会自行退出,这是因为 BotContext 需要被你 Dispose。
:::
2 changes: 1 addition & 1 deletion docs/Lagrange.Core/MessageChain/MessageBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var groupMessageChain = MessageBuilder.Group(_uin)
## 构造私聊消息MessageChain:

```csharp
var groupMessageChain = MessageBuilder.Group(_uin)
var privateMessageChain = MessageBuilder.Friend(_uin)
```

该静态方法将接收一个uint作为目标用户的uin,返回一个MessageChain实例
Expand Down

0 comments on commit a18c1b1

Please sign in to comment.