Class InviteImpl
- java.lang.Object
-
- org.javacord.core.entity.server.invite.InviteImpl
-
- All Implemented Interfaces:
Deletable
,Invite
,RichInvite
public class InviteImpl extends java.lang.Object implements RichInvite
The implementation ofInvite
.
-
-
Constructor Summary
Constructors Constructor Description InviteImpl(DiscordApi api, com.fasterxml.jackson.databind.JsonNode data)
Creates a new invite.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>
delete(java.lang.String reason)
DiscordApi
getApi()
Gets the discord api instance.java.util.Optional<java.lang.Integer>
getApproximateMemberCount()
java.util.Optional<java.lang.Integer>
getApproximatePresenceCount()
java.util.Optional<ServerChannel>
getChannel()
long
getChannelId()
java.lang.String
getChannelName()
ChannelType
getChannelType()
java.lang.String
getCode()
java.time.Instant
getCreationTimestamp()
java.util.Optional<User>
getInviter()
int
getMaxAgeInSeconds()
int
getMaxUses()
java.util.Optional<Server>
getServer()
java.util.Optional<Icon>
getServerIcon()
long
getServerId()
java.lang.String
getServerName()
java.util.Optional<Icon>
getServerSplash()
java.util.Optional<User>
getTargetUser()
java.util.Optional<TargetUserType>
getTargetUserType()
int
getUses()
boolean
isRevoked()
boolean
isTemporary()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.javacord.api.entity.Deletable
delete, deleteAfter, deleteAfter, deleteAfter, deleteAfter
-
-
-
-
Constructor Detail
-
InviteImpl
public InviteImpl(DiscordApi api, com.fasterxml.jackson.databind.JsonNode data)
Creates a new invite.- Parameters:
api
- The discord api instance.data
- The json data of the invite.
-
-
Method Detail
-
getApi
public DiscordApi getApi()
Gets the discord api instance.
-
getServerId
public long getServerId()
- Specified by:
getServerId
in interfaceInvite
-
getServerName
public java.lang.String getServerName()
- Specified by:
getServerName
in interfaceInvite
-
getServerIcon
public java.util.Optional<Icon> getServerIcon()
- Specified by:
getServerIcon
in interfaceInvite
-
getServerSplash
public java.util.Optional<Icon> getServerSplash()
- Specified by:
getServerSplash
in interfaceInvite
-
getChannel
public java.util.Optional<ServerChannel> getChannel()
- Specified by:
getChannel
in interfaceInvite
-
getChannelId
public long getChannelId()
- Specified by:
getChannelId
in interfaceInvite
-
getChannelName
public java.lang.String getChannelName()
- Specified by:
getChannelName
in interfaceInvite
-
getChannelType
public ChannelType getChannelType()
- Specified by:
getChannelType
in interfaceInvite
-
delete
public java.util.concurrent.CompletableFuture<java.lang.Void> delete(java.lang.String reason)
-
getInviter
public java.util.Optional<User> getInviter()
- Specified by:
getInviter
in interfaceInvite
-
getTargetUser
public java.util.Optional<User> getTargetUser()
- Specified by:
getTargetUser
in interfaceInvite
-
getTargetUserType
public java.util.Optional<TargetUserType> getTargetUserType()
- Specified by:
getTargetUserType
in interfaceInvite
-
getUses
public int getUses()
- Specified by:
getUses
in interfaceRichInvite
-
getMaxUses
public int getMaxUses()
- Specified by:
getMaxUses
in interfaceRichInvite
-
getMaxAgeInSeconds
public int getMaxAgeInSeconds()
- Specified by:
getMaxAgeInSeconds
in interfaceRichInvite
-
isTemporary
public boolean isTemporary()
- Specified by:
isTemporary
in interfaceRichInvite
-
getCreationTimestamp
public java.time.Instant getCreationTimestamp()
- Specified by:
getCreationTimestamp
in interfaceRichInvite
-
isRevoked
public boolean isRevoked()
- Specified by:
isRevoked
in interfaceRichInvite
-
getApproximateMemberCount
public java.util.Optional<java.lang.Integer> getApproximateMemberCount()
- Specified by:
getApproximateMemberCount
in interfaceInvite
-
getApproximatePresenceCount
public java.util.Optional<java.lang.Integer> getApproximatePresenceCount()
- Specified by:
getApproximatePresenceCount
in interfaceInvite
-
-