Other Discord Embeds with DiSKy

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

TheIronMoo

Member
Jul 25, 2023
1
0
1
18
This is an example of a Discord embed:

Discord embed example


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):
code_language.skript:
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:
code_language.skript:
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:
code_language.skript:
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:
code_language.skript:
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:
code_language.skript:
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:
code_language.skript:
set image of embed to "https://cdn.discordapp.com/attachments/<integer>/<fileName>.png"
This is the largest image in the embed.

Footer and Timestamp:
code_language.skript:
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:
code_language.skript:
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:
Code:
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