【发布时间】:2021-11-20 00:08:00
【问题描述】:
如何将本地文件添加到我的嵌入为图像。
我不想将它上传到 imgur 或任何东西并获取 URL。由于更改了图像,这对项目不起作用。
我现在的代码:
var emb = new EmbedBuilder()
.WithColor(Color.Blue)
.WithTimestamp(DateTime.Now)
.WithTitle(rarity)
.WithDescription($"{Context.User.Username} dropped a card!")
.WithImageUrl($"attachment://{path}")
.Build();
await Context.Channel.SendFileAsync(path, null, false, emb);
【问题讨论】:
-
这能回答你的问题吗? C# Discord Bot - Upload Local Image
-
@HanletEscaño 它没有。我不想单独发送图像,我想在嵌入中发送。
标签: c# discord.net