Discord Embeds with DiSKy

This is an example of a Discord embed:



To get an embed to show up in a Discord channel you will need to first have an event, usually this is either a timed thing or it could be a command (which is what I will use in the tutorial):

discord command embed:
prefixes: !
trigger:
make embed:


The contents of an embed can be any or all of the following things but here is a list of them (each is represented in the example image).

Title and Description:
set title of embed to "Here is the embed title"
set title url of embed to "https://www.youtube.com/"
set thumbnail of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"
set description of embed to "Here is the embed description%nl%You can add new lines%nl%‎%nl%You can even add line breaks"

In this section we had the title which is a string, the title URL which responds to a click event and takes the user to a website, the thumbnail which is just a small icon next to the title, and a description which is also a string.

Author:
set author of embed to "Author name"
set author url of embed to "https://www.youtube.com/"
set author icon of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"

In this section we had the author name which is a string, the author URL which responds to a click event and takes the user to a website, and the author icon which is an icon next to the author string.

Colour:
set embed color of embed to rgb(50, 100, 500) # or base colour

In this section we had the embed colour, in this example I used an RGB value but you could also just use the built in Minecraft colours such as red, yellow, blue, or purple.

Fields:
add inline field named "Inline Field 1" with value "This is IF1's description" to fields of embed
add inline field named "Inline Field 2" with value "This is IF2's description" to fields of embed
add inline field named "Inline Field 3" with value "This is IF3's description" to fields of embed
add field named "Basic Field 1" with value "This is BF1's description" to fields of embed
add field named "Basic Field 2" with value "This is BF2's description" to fields of embed

In this section we had the fields, these being inline fields and basic fields. An inline field is displayed in a grid fashion where the basic fields are displayed in a vertical list. The name of the field is a small title and the value is a description. You can also add lots more fields than I did in this example.

Image:
set image of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"

This is the largest image in the embed.

Footer and Timestamp:
set footer of embed to "Here is the embed footer"
set footer icon of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"
set timestamp of embed to now

This section has the footer which is a string at the bottom of the embed, the footer icon which is a small image next to the footer, and the timestamp which is a little date and time thing next to the footer.

Final line:
reply with last embed

This is the last line you need but it can't be indented

Those were all the components in an embed. For a full tutorial click here: Discord Embed Tutorial with DiSKy

Here is what the code should look like compiled:
discord command embed:
prefixes: !
trigger:
make embed:
set title of embed to "Here is the embed title"
set title url of embed to "https://www.youtube.com/"
set thumbnail of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"
set description of embed to "Here is the embed description%nl%You can add new lines%nl%‎%nl%You can even add line breaks"
set author of embed to "Author name"
set author url of embed to "https://www.youtube.com/"
set author icon of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"
set embed color of embed to rgb(50, 100, 500) # or base colour
add inline field named "Inline Field 1" with value "This is IF1's description" to fields of embed
add inline field named "Inline Field 2" with value "This is IF2's description" to fields of embed
add inline field named "Inline Field 3" with value "This is IF3's description" to fields of embed
add field named "Basic Field 1" with value "This is BF1's description" to fields of embed
add field named "Basic Field 2" with value "This is BF2's description" to fields of embed
set image of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"
set footer of embed to "Here is the embed footer"
set footer icon of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"
set timestamp of embed to now
reply with last embed