I can't figure out how to post Embed message to Discord channel.
(我不知道如何将嵌入消息发布到Discord频道。)
I've got my webhook: (我有我的webhook:)
public DiscordWebhookClient wHook = new DiscordWebhookClient(649622881288537840, "2hQ2XsT7jucOfT4C8-XTsDSys29mPhOF_gFdZ0wBveqzDBR806m0HFl7VR9-ZJxUMRKO");
And I have a method to Post my embed message like this, but It says that it has to be IEnumerable instead of Discord.Embed:
(而且我有一种方法可以这样发布我的嵌入消息,但是它说它必须是IEnumerable而不是Discord.Embed:)
public async Task SendWebhookAsync(Listing listing)
{
EmbedBuilder builder = new EmbedBuilder();
builder.WithTitle(listing.Name);
builder.WithUrl(listing.Url);
builder.WithImageUrl(listing.ImageUrl);
await wHook.SendMessageAsync("", false, builder.Build());
}
I have seen that people use but I don't understand what is context:
(我已经看到人们在使用,但是我不明白什么是上下文:)
await Context.Channel.SendMessageAsync("", false, builder.Build());
ask by kris translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…