Yan
Yan

Reputation: 73

How to get custom discord embeds for github.io website?

This is what I mean

Source code

What my embed looks like.

I just want to change some stuff like add a picture, change the colour of the blue strip, add some body text, etc.

Upvotes: 0

Views: 3139

Answers (2)

user
user

Reputation: 1070

Use these meta tags inside your index.html file <head> tags.
You have used the og:title tag, use the other two.

<meta property="og:title" content="Write your desired title">
<meta property="og:description" content="Write the body text here">
<meta property="og:image" content="https://hypixelfarms.github.io/images/1.jpeg">

These are for social sharing which use the og property, unlike Search Engines.
For more information visit this page of Css-Tricks.

Upvotes: 3

Aditya Tomar
Aditya Tomar

Reputation: 1639

Here's some Python code that will do what you're asking for. For color, set the variable to the hex code of any color you would like, and replace the # with 0x. I have provided an example one that sets it to green. You can get the color code from here.

@bot.command()
async def test(ctx):
    embed = discord.Embed(
        title="Farms and More", 
        url="https://hypixelfarms.github.io/", 
        description="body text", 
        color=0x4ef207
    )
    embed.set_thumbnail(url="") # enter the URL location of the picture to use for the embed picture
    await ctx.send(embed=embed)

Go to this website for more detailed information on embed features.

Upvotes: 0

Related Questions