Package net.dv8tion.jda.api.entities
Class RoleIcon
- java.lang.Object
-
- net.dv8tion.jda.api.entities.RoleIcon
-
public class RoleIcon extends java.lang.ObjectAn object representing a Role's icon.- See Also:
Role.getIcon()
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringICON_URLTemplate forgetIconUrl().
-
Constructor Summary
Constructors Constructor Description RoleIcon(java.lang.String iconId, java.lang.String emoji, long roleId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetEmoji()The Unicode Emoji of thisRolethat is used instead of a custom image.java.lang.StringgetIconId()The Discord hash-id of theRoleicon image.java.lang.StringgetIconUrl()The URL of theRoleicon image.inthashCode()booleanisEmoji()Whether thisRoleIconis an emoji instead of a custom image.
-
-
-
Field Detail
-
ICON_URL
public static final java.lang.String ICON_URL
Template forgetIconUrl().- See Also:
- Constant Field Values
-
-
Method Detail
-
getIconId
@Nullable public java.lang.String getIconId()
The Discord hash-id of theRoleicon image. If no icon has been set or an emoji is used in its place, this returnsnull.The Role icon can be modified using
RoleManager.setIcon(Icon).- Returns:
- Possibly-null String containing the Role's icon hash-id.
- Since:
- 4.3.1
-
getIconUrl
@Nullable public java.lang.String getIconUrl()
The URL of theRoleicon image. If no icon has been set or an emoji is used in its place, this returnsnull.The Role icon can be modified using
RoleManager.setIcon(Icon).- Returns:
- Possibly-null String containing the Role's icon URL.
- Since:
- 4.3.1
-
getEmoji
@Nullable public java.lang.String getEmoji()
The Unicode Emoji of thisRolethat is used instead of a custom image. If no emoji has been set, this returnsnull.The Role emoji can be modified using
RoleManager.setIcon(String).- Returns:
- Possibly-null String containing the Role's Unicode Emoji.
- Since:
- 4.3.1
-
isEmoji
public boolean isEmoji()
Whether thisRoleIconis an emoji instead of a custom image.- Returns:
- True, if this
RoleIconis an emoji
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-