【发布时间】:2018-05-20 05:12:18
【问题描述】:
我正在尝试在嵌入消息发布后对其进行编辑。我试图使用文档中的这个示例,但它不起作用。 https://discord.foxbot.me/docs/api/Discord.MessageProperties.html
var message = await ReplyAsync("abc");
await message.ModifyAsync(x =>
{
x.Content = "";
x.Embed = new EmbedBuilder()
.WithColor(new Color(40, 40, 120))
.WithAuthor(a => a.Name = "foxbot")
.WithTitle("Embed!")
.WithDescription("This is an embed.");
});
将代码放入我的一个工作命令中会得到一个
无法将类型
Discord.EmbedBuilder隐式转换为Discord.Optional<Discord.Embed>"
真的很迷茫……
【问题讨论】:
-
您在
WithDescription之后缺少.Build()
标签: c# discord.net