mirai-hello-world icon indicating copy to clipboard operation
mirai-hello-world copied to clipboard

请问自定义设备信息怎么做呢?

Open 404-error-404 opened this issue 2 years ago • 0 comments

问题描述

不清楚怎么把本地的设备信息移植到服务器上 文档链接

详细描述

  1. 我能导出device.json
  2. setDeviceInfo()的时候不知道怎么做了
  3. 有尝试去构造DeviceInfo,但是要塞进去好多变量,感觉很麻烦
  4. 而且对上一步的Version version参数有个问题,导出的device.json文件中没有data.version.sdk参数,但是Version的构造函数中有,如下图示例 Version构造方法

我尝试的代码

Bot bot = BotFactory.INSTANCE.newBot(2190915232L, "19990113+zjl", new BotConfiguration(){{
    setDeviceInfo(bot1 -> {
        return new DeviceInfo(/* 在这里构造吗? */)
    });
}});

404-error-404 avatar Oct 18 '22 14:10 404-error-404