Package discord4j.core.object
Class ExtendedInvite
java.lang.Object
discord4j.core.object.Invite
discord4j.core.object.ExtendedInvite
- All Implemented Interfaces:
DiscordObject
Metadata for a Discord invite.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class discord4j.core.object.Invite
Invite.Type
-
Constructor Summary
ConstructorsConstructorDescriptionExtendedInvite
(GatewayDiscordClient gateway, discord4j.discordjson.json.InviteData data) Constructs aExtendedInvite
with an associatedGatewayDiscordClient
and Discord data. -
Method Summary
Modifier and TypeMethodDescriptionGets when this invite was created.Gets the instant this invite expires, if possible.int
Gets the max number of times this invite can be used.int
getUses()
Gets the number of times this invite has been used.boolean
Gets whether this invite only grants temporary membership.toString()
Methods inherited from class discord4j.core.object.Invite
delete, delete, getApproximateMemberCount, getApproximatePresenceCount, getChannel, getChannel, getChannelId, getClient, getCode, getGuild, getGuild, getGuildId, getInviter, getInviterId, getTargetType, getTargetUser, getTargetUserId, getTargetUserType
-
Constructor Details
-
ExtendedInvite
Constructs aExtendedInvite
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 Details
-
getUses
public int getUses()Gets the number of times this invite has been used.- Returns:
- The number of times this invite has been used.
-
getMaxUses
public int getMaxUses()Gets the max number of times this invite can be used.- Returns:
- The max number of times this invite can be used.
-
getExpiration
Gets the instant this invite expires, if possible.- Returns:
- The instant this invite expires, if empty, invite is never expiring.
-
isTemporary
public boolean isTemporary()Gets whether this invite only grants temporary membership.- Returns:
true
if this invite only grants temporary membership
-
getCreation
Gets when this invite was created.- Returns:
- When this invite was created.
-
toString
-