我正在尝试更改公会图标,但是我不知道如何完成代码。 这就是我现在拥有的:
HttpClient dude = new HttpClient();
var b= await dude.GetStreamAsync("somelink");
Image pic = new Image();
await Context.Guild.ModifyAsync(x => x.Icon = pic.Stream.
答案 0 :(得分:0)
HttpClient link = new Httpclient();
var clonestream = new MemoryStream();
Stream stream = await link.GetStreamAsync("link");
stream.CopyTo(clonestream);
Image pic = new Image(clonestream);
clonestream.Position = 0;
await Context.Guild.ModifyAsync(x => x.Icon = pic);