【发布时间】:2021-03-12 17:47:35
【问题描述】:
下面是发布嵌入消息后的代码我希望机器人删除它为发布嵌入而给出的命令。另外,如果有人知道如何在此嵌入中添加页脚,那就太棒了
if (raid == "gos")
{
if (day == "Sun")
{
var filename = "gos_Sun.png";
var embed = new EmbedBuilder()
{
Title = "Garden of Salvation",
Description = "```" + day + ", " + date + " @ " + time + " " + ampm + " " + "\n" + description + "```" + description2,
ImageUrl = $"attachment://{filename}",
}.Build();
SentEmbed = await Context.Channel.SendFileAsync(filename, embed: embed);
await SentEmbed.AddReactionsAsync(myReactions);
}
}
【问题讨论】:
-
只需在 Context.Message 上调用 DeleteAsync。嵌入构建器也有一个页脚属性
-
是的,但是当我执行 Footer = "React below" 时,我得到一个错误
-
无法将类型字符串隐式转换为 Discord.EmbedFooterBuilder,因此它不像描述或标题剂量那样工作,并且通过我的所有研究,我无法获得使用页脚属性的示例
-
好吧,这样使用时它不是字符串。这是一个页脚构建器或类似的东西。所以你必须创建并传递其中一个
标签: c# discord embed discord.net