I am looking to embed the following:
Using the Discord API. I have looked and the only resources I can find are for Python, Java, Ruby, etc.
But when using:
var embed = new Message.Embed(
{
Author =
{
Name = "Name",
Url = "www.url.com"
}
});
It comes back with the message:
And:
Not sure What I need to do to be able use the embed library. Just looking for some guidance on how this works
Edit:
When Using this I get no errors but when running the embed doesnt seem to build. It doesnt error. It just never builds the embed variable
var embed = new Message.Embed
{
Author =
{
Name = "Lawler",
Url = "www.twitch.tv/Lawler"
},
Title = "www.twitch.tv/Lawler",
Thumbnail =
{
ProxyUrl = "https://yt3.ggpht.com/-m-P7t2g-ecQ/AAAAAAAAAAI/AAAAAAAAAAA/YtS2YsD8-AM/s900-c-k-no-mo-rj-c0xffffff/photo.jpg",
Url = "www.twitch.tv/Lawler"
},
Description = "**Now Playing**\n" +
"Rocket League\n" +
"**Stream Title**\n" +
"Lawler RLCS Caster"
};
*Note: I am using Discord v 0.9.6
Just a quick look at your code, I think you've got a close parenthesis in the wrong place.
Try the following:
var embed = new Message.Embed()
{
Author =
{
Name = "Name",
Url = "www.url.com"
}
};
Again, without doing any research you may also need to do the following:
var embed = new Message.Embed()
{
Author = new Author()
{
Name = "Name",
Url = "www.url.com"
}
};