Package net.dv8tion.jda.api.entities
Interface ApplicationTeam
-
- All Superinterfaces:
ISnowflake
public interface ApplicationTeam extends ISnowflake
Meta-data for the team of an application.- See Also:
ApplicationInfo.getTeam()
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ICON_URL
Template forgetIconUrl()
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getIconId()
The id hash for the icon of this team.default java.lang.String
getIconUrl()
The url for the icon of this team.default TeamMember
getMember(User user)
Retrieves theTeamMember
instance for the provided user.default TeamMember
getMemberById(long userId)
Retrieves theTeamMember
instance for the provided user id.default TeamMember
getMemberById(java.lang.String userId)
Retrieves theTeamMember
instance for the provided user id.java.util.List<TeamMember>
getMembers()
TheTeam Members
.default TeamMember
getOwner()
default java.lang.String
getOwnerId()
The id for the user who owns this team.long
getOwnerIdLong()
The id for the user who owns this team.default boolean
isMember(User user)
Check whethergetMember(User)
returns null for the provided user.-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Field Detail
-
ICON_URL
static final java.lang.String ICON_URL
Template forgetIconUrl()
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOwner
@Nullable default TeamMember getOwner()
Searches for theTeamMember
ingetMembers()
that has the same user id asgetOwnerIdLong()
.
Its possible although unlikely that the owner of the team is not a member, in that case this will be null.- Returns:
- Possibly-null
TeamMember
who owns the team
-
getOwnerId
@Nonnull default java.lang.String getOwnerId()
The id for the user who owns this team.- Returns:
- The owner id
-
getOwnerIdLong
long getOwnerIdLong()
The id for the user who owns this team.- Returns:
- The owner id
-
getIconId
@Nullable java.lang.String getIconId()
The id hash for the icon of this team.- Returns:
- The icon id, or null if no icon is applied
- See Also:
getIconUrl()
-
getIconUrl
@Nullable default java.lang.String getIconUrl()
The url for the icon of this team.- Returns:
- The icon url, or null if no icon is applied
-
getMembers
@Nonnull java.util.List<TeamMember> getMembers()
TheTeam Members
.- Returns:
- Immutable list of team members
-
isMember
default boolean isMember(@Nonnull User user)
Check whethergetMember(User)
returns null for the provided user.- Parameters:
user
- The user to check- Returns:
- True, if the provided user is a member of this team
- Throws:
java.lang.IllegalArgumentException
- If provided with null
-
getMember
@Nullable default TeamMember getMember(@Nonnull User user)
Retrieves theTeamMember
instance for the provided user. If the user is not a member of this team, null is returned.- Parameters:
user
- The user for the team member- Returns:
- The
TeamMember
for the user or null - Throws:
java.lang.IllegalArgumentException
- If provided with null
-
getMemberById
@Nullable default TeamMember getMemberById(@Nonnull java.lang.String userId)
Retrieves theTeamMember
instance for the provided user id. If the user is not a member of this team, null is returned.- Parameters:
userId
- The user id for the team member- Returns:
- The
TeamMember
for the user or null - Throws:
java.lang.IllegalArgumentException
- If provided with null
-
getMemberById
@Nullable default TeamMember getMemberById(long userId)
Retrieves theTeamMember
instance for the provided user id. If the user is not a member of this team, null is returned.- Parameters:
userId
- The user id for the team member- Returns:
- The
TeamMember
for the user or null
-
-