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

[BUG] Constantly fail to upload file #39

Closed SinoAHpx closed 2 years ago

SinoAHpx commented 2 years ago

怎么复现?

bot.MessageReceived
    .OfType<GroupMessageReceiver>()
    .Subscribe(async r =>
{
    if (r.MessageChain.GetPlainMessage() == "/send")
    {
        var localPath = @"C:\Users\ahpx\Desktop\RandomChoiceGenerator.exe";
        var file = await FileManager.UploadFileAsync(r.GroupId, localPath);
        await r.SendMessageAsync($"The file has been uploaded. \r\n{file.ToJsonString()}");
    }
});

Existing issue: https://github.com/project-mirai/mirai-api-http/issues/553