Package discord4j.core.object.entity
Class ApplicationTeam
- java.lang.Object
-
- discord4j.core.object.entity.ApplicationTeam
-
- All Implemented Interfaces:
DiscordObject
,Entity
public final class ApplicationTeam extends Object implements Entity
- See Also:
- Team Resource
-
-
Constructor Summary
Constructors Constructor Description ApplicationTeam(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationTeamData data)
Constructs aApplicationTeam
with an associatedGatewayDiscordClient
and Discord data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GatewayDiscordClient
getClient()
Returns theGatewayDiscordClient
that created this object.Snowflake
getId()
Gets the Snowflake that uniquely identifies this entity.List<ApplicationTeamMember>
getMembers()
Gets the members of the team.String
getName()
Gets the name of the team.Mono<User>
getOwner()
Requests to retrieve the current team owner.Mono<User>
getOwner(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the current team owner, using the given retrieval strategy.Snowflake
getOwnerId()
Gets the user id of the current team owner.String
toString()
-
-
-
Constructor Detail
-
ApplicationTeam
public ApplicationTeam(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationTeamData data)
Constructs aApplicationTeam
with an associatedGatewayDiscordClient
and Discord data.- Parameters:
gateway
- TheGatewayDiscordClient
associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.
-
-
Method Detail
-
getClient
public GatewayDiscordClient getClient()
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-
getId
public Snowflake getId()
Description copied from interface:Entity
Gets the Snowflake that uniquely identifies this entity.
-
getMembers
public List<ApplicationTeamMember> getMembers()
Gets the members of the team.- Returns:
- The members of the team.
-
getName
public String getName()
Gets the name of the team.- Returns:
- The name of the team.
-
getOwnerId
public Snowflake getOwnerId()
Gets the user id of the current team owner.- Returns:
- The user id of the current team owner.
-
getOwner
public Mono<User> getOwner(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the current team owner, using the given retrieval strategy.
-
-