From 28f039da4cd2800f6d45d2d0c3b7890ede8e37f5 Mon Sep 17 00:00:00 2001 From: Linwenxuan <116782992+Linwenxuan05@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:24:36 +0800 Subject: [PATCH] Added appsettings.json snippet --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fcbe6aa..a616ed1 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,9 @@ Please use Lagrange.Core responsibly and in accordance with the law. | | | | | | | Send Message | 🟢 | ~~FriendTyping~~ | 🔴 | | | | | | | | | | ~~FriendVoiceCall~~ | 🔴 | -## OneBot-11 +## Lagrange.OneBot -### Implementation +### Implementation - OneBot v11
Message Segement @@ -224,6 +224,55 @@ Please use Lagrange.Core responsibly and in accordance with the law.
+#### appsettings.json Example +```C# +{ + "Logging": { + "LogLevel": { + "Default": "Trace", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AccessToken": "", + "Account": { + "Uin": 0, + "Password": "", + "Protocol": "Linux", + "AutoReconnect": true, + "GetOptimumServer": true + }, + "Implementation": { + "ForwardWebSocket": { + "Host": "", + "Port": 0, + "HeartBeatIntetval": 0 + }, + "ReverseWebSocket": { + "Host": "127.0.0.1", + "Port": 8080, + "Suffix": "/onebot/v11/ws", + "ReconnectInterval": 0, + "HeartBeatInterval": 5000 + }, + "Http": { + "Host": "", + "Port": 0, + "EventEnabled": false + }, + "HttpPost": { + "Host": "127.0.0.1", + "Port": 8080, + "Suffix": "/onebot/v11/http", + "Timeout": 0 + } + } +} +``` +- Create a file named 'appsettings.json' under Lagrange.OneBot executable directory +- As the Uin is 0 here, this indicates that QRCode login is used +- After the QRCode Login, write Uin back to perform EasyLogin + ## 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.~~