Skip to content

Commit

Permalink
[README] update readme, Drain to document (#753)
Browse files Browse the repository at this point in the history
* [README] update readme, Drain to document

* update readme
  • Loading branch information
DarkRRb authored Feb 4, 2025
1 parent ed087a8 commit 020cd59
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 578 deletions.
301 changes: 13 additions & 288 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
</tr>
</table>

## Document

[Lagrange.Doc](https://lagrangedev.github.io/Lagrange.Doc/)

[Docker guide](Docker.md)

## Out of Active Feature Requesting

Lagrange.Core has completed nearly all the function and task scheduled by Linwenxuan05, so mostly enhance to the library would be concentrated to the repo for next.
Expand All @@ -60,16 +54,16 @@ By using or accessing Lagrange.Core, the user acknowledges and agrees to release

Please use Lagrange.Core responsibly and in accordance with the law.

## SignServer

https://sign.lagrangecore.org/api/sign
# Lagrange.Core

Thanks for 外国热心网友 for Provision of Azure Servlet
## Document

** Built-in SignServer is now provided, Enjoy! **
[Lagrange.Core Document](https://lagrangedev.github.io/Lagrange.Doc/Lagrange.Core/)

## Features List

<Details>

| Protocol | Support | Login | Support | Messages | Support | Operations | Support | Events | Support |
| -------- | :-----: | ------------------------- | :-----: | :-------- | :-----: | :---------------- | :-----: | :------------------ | :-----: |
| Windows | 🟢 | QrCode | 🟢 | Images | 🟢 | Poke | 🟢 | Captcha | 🟢 |
Expand All @@ -87,289 +81,20 @@ Thanks for 外国热心网友 for Provision of Azure Servlet
| | | | | | | Send Message | 🟢 | ~~FriendTyping~~ | 🔴 |
| | | | | | | | | ~~FriendVoiceCall~~ | 🔴 |

## Lagrange.OneBot

> The Binary for development could be found in Actions Artifacts
<Details>
<Summary>Message Segement</Summary>

| Message Segement | Support |
| ---------------- | :-----: |
| [Text] | 🟢 |
| [Face] | 🟢 |
| [Image] | 🟢 |
| [Record] | 🟢 |
| [Video] | 🟢 |
| [At] | 🟢 |
| [Rps] | 🟢 |
| [Dice] | 🟢 |
| [Shake] | 🔴 |
| [Poke] | 🟢 |
| [Anonymous] | 🔴 |
| [Share] | 🔴 |
| [Contact] | 🔴 |
| [Location] | 🟢 |
| [Music] | 🟢 |
| [Reply] | 🟢 |
| [Forward] | 🟢 |
| [Node] | 🟢 |
| [Xml] | 🔴 |
| [Json] | 🟢 |

[Text]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#qq-%E8%A1%A8%E6%83%85
[Record]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E8%AF%AD%E9%9F%B3
[Face]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#qq-%E8%A1%A8%E6%83%85
[Image]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%9B%BE%E7%89%87
[Shake]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E7%AA%97%E5%8F%A3%E6%8A%96%E5%8A%A8%E6%88%B3%E4%B8%80%E6%88%B3-
[Poke]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E6%88%B3%E4%B8%80%E6%88%B3
[Anonymous]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%8C%BF%E5%90%8D%E5%8F%91%E6%B6%88%E6%81%AF-
[Location]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E4%BD%8D%E7%BD%AE
[Video]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E7%9F%AD%E8%A7%86%E9%A2%91
[At]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E6%9F%90%E4%BA%BA
[Rps]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E7%8C%9C%E6%8B%B3%E9%AD%94%E6%B3%95%E8%A1%A8%E6%83%85
[Dice]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E6%8E%B7%E9%AA%B0%E5%AD%90%E9%AD%94%E6%B3%95%E8%A1%A8%E6%83%85
[share]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E9%93%BE%E6%8E%A5%E5%88%86%E4%BA%AB
[Music]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E9%9F%B3%E4%B9%90%E5%88%86%E4%BA%AB-
[Contact]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E6%8E%A8%E8%8D%90%E5%A5%BD%E5%8F%8B
[Reply]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%9B%9E%E5%A4%8D
[Forward]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91-
[Node]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91%E8%8A%82%E7%82%B9-
[Xml]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#xml-%E6%B6%88%E6%81%AF
[Json]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#json-%E6%B6%88%E6%81%AF

</Details>

<Details>
<Summary>API</Summary>

| API | Support |
| ------------------------------ | :-----: |
| [/send_private_msg] | 🟢 |
| [/send_group_msg] | 🟢 |
| [/send_msg] | 🟢 |
| [/delete_msg] | 🟢 |
| [/get_msg] | 🟢 |
| [/get_forward_msg] | 🟢 |
| [/send_like] | 🟢 |
| [/set_group_kick] | 🟢 |
| [/set_group_ban] | 🟢 |
| ~~[/set_group_anonymous_ban]~~ | 🔴 |
| [/set_group_whole_ban] | 🟢 |
| [/set_group_admin] | 🟢 |
| ~~[/set_group_anonymous]~~ | 🔴 |
| [/set_group_card] | 🟢 |
| [/set_group_name] | 🟢 |
| [/set_group_leave] | 🟢 |
| [/set_group_special_title] | 🟢 |
| [/set_friend_add_request] | 🟢 |
| [/set_group_add_request] | 🟢 |
| [/get_login_info] | 🟢 |
| [/get_stranger_info] | 🟢 |
| [/get_friend_list] | 🟢 |
| [/get_group_info] | 🟢 |
| [/get_group_list] | 🟢 |
| [/get_group_member_info] | 🟢 |
| [/get_group_member_list] | 🟢 |
| [/get_group_honor_info] | 🟢 |
| [/get_cookies] | 🟢 |
| [/get_csrf_token] | 🟢 |
| [/get_credentials] | 🟢 |
| [/get_record] | 🔴 |
| [/get_image] | 🔴 |
| [/can_send_image] | 🟢 |
| [/can_send_record] | 🟢 |
| [/get_status] | 🟢 |
| [/get_version_info] | 🟢 |
| [/set_restart] | 🟢 |
| [/clean_cache] | 🔴 |

[/send_private_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_private_msg-%E5%8F%91%E9%80%81%E7%A7%81%E8%81%8A%E6%B6%88%E6%81%AF
[/send_group_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_group_msg-%E5%8F%91%E9%80%81%E7%BE%A4%E6%B6%88%E6%81%AF
[/send_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_msg-发送消息
[/delete_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#delete_msg-撤回消息
[/get_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_msg-获取消息
[/get_forward_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_forward_msg-获取合并转发消息
[/send_like]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_like-发送好友赞
[/set_group_kick]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_kick-群组踢人
[/set_group_ban]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_ban-群组单人禁言
[/set_group_anonymous_ban]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_anonymous_ban-群组匿名用户禁言
[/set_group_whole_ban]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_whole_ban-群组全员禁言
[/set_group_admin]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_admin-群组设置管理员
[/set_group_anonymous]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_anonymous-群组匿名
[/set_group_card]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_card-设置群名片群备注
[/set_group_name]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_name-设置群名
[/set_group_leave]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_leave-退出群组
[/set_group_special_title]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_special_title-设置群组专属头衔
[/set_friend_add_request]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_friend_add_request-处理加好友请求
[/set_group_add_request]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_add_request-处理加群请求邀请
[/get_login_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_login_info-获取登录号信息
[/get_stranger_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_stranger_info-获取陌生人信息
[/get_friend_list]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_friend_list-获取好友列表
[/get_group_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_info-获取群信息
[/get_group_list]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_list-获取群列表
[/get_group_member_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_member_info-获取群成员信息
[/get_group_member_list]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_member_list-获取群成员列表
[/get_group_honor_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_honor_info-获取群荣誉信息
[/get_cookies]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_cookies-获取-cookies
[/get_csrf_token]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_csrf_token-获取-csrf-token
[/get_credentials]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_credentials-获取-qq-相关接口凭证
[/get_record]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_record-获取语音
[/get_image]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_image-获取图片
[/can_send_image]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#can_send_image-检查是否可以发送图片
[/can_send_record]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#can_send_record-检查是否可以发送语音
[/get_status]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_status-获取运行状态
[/get_version_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_version_info-获取版本信息
[/set_restart]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_restart-重启-onebot-实现
[/clean_cache]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#clean_cache-清理缓存
# Lagrange.OneBot

</Details>

<Details>
<Summary>Event</Summary>

| PostType | EventName | Support |
| -------- | ------------------------------ | :-----: |
| Message | [Private Message] | 🟢 |
| Message | [Group Message] | 🟢 |
| Notice | [Group File Upload] | 🟢 |
| Notice | [Group Admin Change] | 🟢 |
| Notice | [Group Member Decrease] | 🟢 |
| Notice | [Group Member Increase] | 🟢 |
| Notice | [Group Mute] | 🟢 |
| Notice | [Friend Add] | 🟢 |
| Notice | [Group Recall Message] | 🟢 |
| Notice | [Friend Recall Message] | 🟢 |
| Notice | [Group Poke] | 🟢 |
| Notice | [Group red envelope luck king] | 🔴 |
| Notice | [Group Member Honor Changed] | 🔴 |
| Request | [Add Friend Request] | 🟢 |
| Request | [Group Request/Invitations] | 🟢 |
| Meta | [LifeCycle] | 🟢 |
| Meta | [Heartbeat] | 🟢 |

[Private Message]: https://github.com/botuniverse/onebot-11/blob/master/event/message.md#%E7%A7%81%E8%81%8A%E6%B6%88%E6%81%AF
[Group Message]: https://github.com/botuniverse/onebot-11/blob/master/event/message.md#%E7%BE%A4%E6%B6%88%E6%81%AF
[Group File Upload]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0
[Group Admin Change]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E7%AE%A1%E7%90%86%E5%91%98%E5%8F%98%E5%8A%A8
[Group Member Decrease]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%88%90%E5%91%98%E5%87%8F%E5%B0%91
[Group Member Increase]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%88%90%E5%91%98%E5%A2%9E%E5%8A%A0
[Group Mute]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E7%A6%81%E8%A8%80
[Friend Add]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E5%A5%BD%E5%8F%8B%E6%B7%BB%E5%8A%A0
[Group Recall Message]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%B6%88%E6%81%AF%E6%92%A4%E5%9B%9E
[Friend Recall Message]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E5%A5%BD%E5%8F%8B%E6%B6%88%E6%81%AF%E6%92%A4%E5%9B%9E
[Group Poke]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E5%86%85%E6%88%B3%E4%B8%80%E6%88%B3
[Group red envelope luck king]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E7%BA%A2%E5%8C%85%E8%BF%90%E6%B0%94%E7%8E%8B
[Group Member Honor Changed]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%88%90%E5%91%98%E8%8D%A3%E8%AA%89%E5%8F%98%E6%9B%B4
[Add Friend Request]: https://github.com/botuniverse/onebot-11/blob/master/event/request.md#%E5%8A%A0%E5%A5%BD%E5%8F%8B%E8%AF%B7%E6%B1%82
[Group Request/Invitations]: https://github.com/botuniverse/onebot-11/blob/master/event/request.md#%E5%8A%A0%E7%BE%A4%E8%AF%B7%E6%B1%82%E9%82%80%E8%AF%B7
[LifeCycle]: https://github.com/botuniverse/onebot-11/blob/master/event/meta.md#%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F
[Heartbeat]: https://github.com/botuniverse/onebot-11/blob/master/event/meta.md#%E5%BF%83%E8%B7%B3
## Document

</Details>
[Lagrange.OneBot Document](https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/)

<Details>
<Summary>Communication</Summary>
[Docker guide](Docker.md)

| CommunicationType | Support |
| ------------------ | :-----: |
| [Http] | 🟢 |
| [Http-Post] | 🟢 |
| [ForwardWebSocket] | 🟢 |
| [ReverseWebSocket] | 🟢 |
## SignServer

[Http]: https://github.com/botuniverse/onebot-11/blob/master/communication/http.md
[Http-Post]: https://github.com/botuniverse/onebot-11/blob/master/communication/http-post.md
[ForwardWebSocket]: https://github.com/botuniverse/onebot-11/blob/master/communication/ws.md
[ReverseWebSocket]: https://github.com/botuniverse/onebot-11/blob/master/communication/ws-reverse.md
https://sign.lagrangecore.org/api/sign

</Details>
Thanks for 外国热心网友 for Provision of Azure Servlet

### `appsettings.json` Example

> As the Password is empty here, this indicates that QRCode login is used
```json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"SignServerUrl": "",
"Account": {
"Uin": 0, // Only used to create lagrange-{uin}.db and qr-{uin}.png
"Protocol": "Linux",
"AutoReconnect": true,
"GetOptimumServer": true
},
"Message": {
"IgnoreSelf": true,
"StringPost": false
},
"QrCode": {
"ConsoleCompatibilityMode": false
},
"Implementations": [
{
"Type": "ReverseWebSocket",
"Host": "127.0.0.1",
"Port": 8080,
"Suffix": "/onebot/v11/ws",
"ReconnectInterval": 5000,
"HeartBeatInterval": 5000,
"HeartBeatEnable": true,
"AccessToken": ""
},
{
"Type": "ForwardWebSocket",
"Host": "*",
"Port": 8081,
"HeartBeatInterval": 5000,
"HeartBeatEnable": true,
"AccessToken": ""
},
{
"Type": "HttpPost",
"Host": "127.0.0.1",
"Port": 8082,
"Suffix": "/",
"HeartBeatInterval": 5000,
"HeartBeatEnable": true,
"AccessToken": ""
},
{
"Type": "Http",
"Host": "*",
"Port": 8083,
"AccessToken": ""
}
]
}
```

> [!WARNING]
> Currently, `ForwardWebSocket` and `Http` are implemented based on `HttpListener`, which has the following problems:
>
> 1. On Linux, the `Host` header of an Http request must match the value of `Prefix` unless it is `+` or `*`, so configure the `Host` of `ForwardWebSocket` and `Http` to be the domain name or IP you are using to access it.
>
> 2. On Windows, the `HttpListener` is based on the `http.sys` implementation, so you need to register `urlacl` before using it. see [netsh](https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-http). You can also start `Lagrange.OneBot` using the administrator, at which point `HttpListener` will automatically register the required `urlacl`.
## NOTICE BEFORE LOGIN

- The NewDeviceLogin feature has not been implemented yet. It is recommended to use QRCode login for now.
- Currently, only the signature server implementation for Linux protocol is available. It is recommended to use the Linux protocol.

## Known Problem

- ~~[ ] Signature Service is currently not established, so the login tend to be failed and return code may be 45, you can establish your own sign service by rewriting the `Signature` static class.~~

~~Thanks KonataDev/TheSnowfield for Provision of Signature API~~

~~Signature API is now not provided, you may need to find it somewhere and inherit `SignProvider` class for `CustomSignProvider` in `BotConfig`~~

- ~~Built-in SignServer is now provided, Enjoy!~~

- Signature of Windows and macOS is missing, you need to figure out by your self
** Built-in SignServer is now provided, Enjoy! **
Loading

0 comments on commit 020cd59

Please sign in to comment.