Skip to content

Commit

Permalink
Change MessageEmbed#getUrl docs to mention representing the title url (
Browse files Browse the repository at this point in the history
…#1975)

Co-authored-by: Austin Keener <keeneraustin@yahoo.com>
  • Loading branch information
mlnrDev and DV8FromTheWorld committed Jan 21, 2022
1 parent e4a2c5b commit 2958e68
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/main/java/net/dv8tion/jda/api/entities/MessageEmbed.java
Expand Up @@ -71,7 +71,7 @@ public class MessageEmbed implements SerializableData
* @see net.dv8tion.jda.api.EmbedBuilder#setDescription(CharSequence) EmbedBuilder.setDescription(text)
*/
public static final int DESCRIPTION_MAX_LENGTH = 4096;

/**
* The maximum length the footer of an embed can have
*
Expand Down Expand Up @@ -151,9 +151,10 @@ public MessageEmbed(
}

/**
* The that was originally placed into chat that spawned this embed.
* The url that was originally placed into chat that spawned this embed.
* <br><b>This will return the {@link #getTitle() title url} if the {@link #getType() type} of this embed is {@link EmbedType#RICH RICH}.</b>
*
* @return Possibly-null String containing the original message url.
* @return Possibly-null String containing the link that spawned this embed or the title url
*/
@Nullable
public String getUrl()
Expand Down Expand Up @@ -251,7 +252,7 @@ public VideoInfo getVideoInfo()
{
return videoInfo;
}

/**
* The footer (bottom) of the embedded content.
* <br>This is typically used for timestamps or site icons.
Expand All @@ -264,7 +265,7 @@ public Footer getFooter()
{
return footer;
}

/**
* The information about the image in the message embed
*
Expand All @@ -276,7 +277,7 @@ public ImageInfo getImage()
{
return image;
}

/**
* The fields in a message embed.
* <br>Message embeds can contain multiple fields, each with a name, value, and a boolean
Expand All @@ -291,7 +292,7 @@ public List<Field> getFields()
{
return fields;
}

/**
* The color of the stripe on the side of the embed.
* <br>If the color is 0 (no color), this will return null.
Expand All @@ -314,7 +315,7 @@ public int getColorRaw()
{
return color;
}

/**
* The timestamp of the embed.
*
Expand Down Expand Up @@ -687,7 +688,7 @@ public boolean equals(Object obj)
&& video.height == height);
}
}

/**
* Represents the information provided to embed an image.
*/
Expand Down Expand Up @@ -716,7 +717,7 @@ public String getUrl()
{
return url;
}

/**
* The url of the image, proxied by Discord
* <br>This url is used to access the image through Discord instead of directly to prevent ip scraping.
Expand Down Expand Up @@ -761,7 +762,7 @@ public boolean equals(Object obj)
&& image.height == height);
}
}

/**
* Class that represents the author of content, possibly including an icon
* that Discord proxies.
Expand Down Expand Up @@ -803,7 +804,7 @@ public String getUrl()
{
return url;
}

/**
* The url of the author's icon.
*
Expand All @@ -814,7 +815,7 @@ public String getIconUrl()
{
return iconUrl;
}

/**
* The url of the author's icon, proxied by Discord
* <br>This url is used to access the image through Discord instead of directly to prevent ip scraping.
Expand All @@ -839,7 +840,7 @@ public boolean equals(Object obj)
&& Objects.equals(author.proxyIconUrl, proxyIconUrl));
}
}

/**
* Class that represents a footer at the bottom of an embed
*/
Expand All @@ -866,7 +867,7 @@ public String getText()
{
return text;
}

/**
* The url of the footer's icon.
*
Expand All @@ -877,7 +878,7 @@ public String getIconUrl()
{
return iconUrl;
}

/**
* The url of the footer's icon, proxied by Discord
* <br>This url is used to access the image through Discord instead of directly to prevent ip scraping.
Expand All @@ -901,7 +902,7 @@ public boolean equals(Object obj)
&& Objects.equals(footer.proxyIconUrl, proxyIconUrl));
}
}

/**
* Represents a field in an embed. A single embed contains an array of
* embed fields, each with a name and value, and a boolean determining if
Expand Down Expand Up @@ -945,7 +946,7 @@ else if (value.length() > VALUE_MAX_LENGTH)
}
this.inline = inline;
}

public Field(String name, String value, boolean inline)
{
this(name, value, inline, true);
Expand All @@ -972,7 +973,7 @@ public String getValue()
{
return value;
}

/**
* If the field is in line.
*
Expand Down

0 comments on commit 2958e68

Please sign in to comment.