Mirai-NET-Shelter / Mirai.Net

Mirai.Net是基于mirai-api-http实现的轻量级mirai社区sdk。
GNU Affero General Public License v3.0
186 stars 26 forks source link

"\nIs not a valid json!" System.ArgumentException when await Bot.Launch(); #2

Closed ca1e closed 3 years ago

ca1e commented 3 years ago

[INFO] Verifying "net.mamoe:mirai-console" version 2.6.6 I/main: mirai-console started successfully. GetPluginVersion() => "2.0.2"

SinoAHpx commented 3 years ago

请上代码,以供复现

ca1e commented 3 years ago

c#侧只有demo代码:

Bot.Session = new MiraiSession
{
    Host = "localhost",
    Port = "8080",
    Key = "INITKEY0O2AUHqh",
    QQ = "xxxxxxxx",
};
var ver = await Bot.GetPluginVersion();
await Bot.Launch();

mirai-api-http config:

adapters: 
  - http
  - ws
debug: false
enableVerify: true
verifyKey: INITKEY0O2AUHqh
debug: true
singleMode: true
cacheSize: 4096
adapterSettings: {}
SinoAHpx commented 3 years ago

你用的是2.x版本((( 而这个库基于v1.11.0 编写((

ca1e commented 3 years ago

Ok好的吧:(有适配更新的计划吗?或者说目前推荐使用何种方式呢?

SinoAHpx commented 3 years ago

明天看看文档,如果改动不是很大的话尽量进行新版本适配

SinoAHpx commented 3 years ago

等我重写吧( 说实话,这个项目本身的设计就比较糟糕,刚开始其实只是写了玩的( 异常处理一塌糊涂,现在我根本维护不了( 所以请等我重写一下 或者你可以使用1.x版本的mirai-api-http插件,这也是一个暂行之策。

SinoAHpx commented 3 years ago

这个库已经重构完成,欢迎品鉴!