Skip to content

2.4.1

Compare
Choose a tag to compare
@SinoAHpx SinoAHpx released this 30 Apr 15:47
· 85 commits to 2.4 since this release

增加了ConnectConfig来配置连接,它可以被隐式地和字符串进行互转 #41

以前你这样初始化一个MiraiBot对象:

var bot = new MiraiBot
{
    Address = "localhost:8080",
    VerifyKey = "xx",
    QQ = "xx"
};

现在你可以这样了:

var bot = new MiraiBot
{
    Address = new ConnectConfig
    {
        HttpAddress = new ConnectConfig.AdapterConfig("localhost", "8080"), //或者直接使用字符串,AdapterConfig同样可以和字符串隐式互转
        WebsocketAddress = new ConnectConfig.AdapterConfig("localhost", "1234")
    },
    VerifyKey = "xx",
    QQ = "xx"
};

增加了Bot模板

pending