Interface Invite
-
- All Known Subinterfaces:
RichInvite
public interface InviteThis class represents an invite object. Invite objects won't receive any updates!
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.concurrent.CompletableFuture<java.lang.Void>delete()Deletes the invite.java.util.concurrent.CompletableFuture<java.lang.Void>delete(java.lang.String reason)Deletes the invite.java.util.Optional<java.lang.Integer>getApproximateMemberCount()Gets the approximate number of members for the target server.java.util.Optional<java.lang.Integer>getApproximatePresenceCount()Gets the approximate number of online members for the target server.java.util.Optional<ServerChannel>getChannel()Gets the channel of the invite.longgetChannelId()Gets the id of the channel.java.lang.StringgetChannelName()Gets the name of the channel.ChannelTypegetChannelType()Gets the type of the channel.java.lang.StringgetCode()Gets the code of the invite.java.util.Optional<User>getInviter()Gets the user who created the invite.java.util.Optional<Server>getServer()Gets the server of the invite.java.util.Optional<Icon>getServerIcon()Gets the icon of the server.longgetServerId()Gets the id of the server.java.lang.StringgetServerName()Gets the name of the server.java.util.Optional<Icon>getServerSplash()Gets the splash of the server.java.util.Optional<User>getTargetUser()Gets the user which the invite was created for.java.util.Optional<TargetUserType>getTargetUserType()Gets the user type which the invite was created for.default java.net.URLgetUrl()Gets the url of the invite.
-
-
-
Method Detail
-
getCode
java.lang.String getCode()
Gets the code of the invite.- Returns:
- The code of the invite.
-
getUrl
default java.net.URL getUrl()
Gets the url of the invite.- Returns:
- The url of the invite.
-
getServer
java.util.Optional<Server> getServer()
Gets the server of the invite.- Returns:
- The server of the invite.
-
getServerId
long getServerId()
Gets the id of the server.- Returns:
- The id of the server.
-
getServerName
java.lang.String getServerName()
Gets the name of the server.- Returns:
- The name of the server.
-
getServerIcon
java.util.Optional<Icon> getServerIcon()
Gets the icon of the server.- Returns:
- The icon of the server.
-
getServerSplash
java.util.Optional<Icon> getServerSplash()
Gets the splash of the server.- Returns:
- The splash of the server.
-
getChannel
java.util.Optional<ServerChannel> getChannel()
Gets the channel of the invite.- Returns:
- The channel of the invite.
-
getChannelId
long getChannelId()
Gets the id of the channel.- Returns:
- The id of the channel.
-
getChannelName
java.lang.String getChannelName()
Gets the name of the channel.- Returns:
- The name of the channel.
-
getChannelType
ChannelType getChannelType()
Gets the type of the channel.- Returns:
- The type of the channel.
-
delete
default java.util.concurrent.CompletableFuture<java.lang.Void> delete()
Deletes the invite.- Returns:
- A future to check if the deletion was successful.
-
delete
java.util.concurrent.CompletableFuture<java.lang.Void> delete(java.lang.String reason)
Deletes the invite.- Parameters:
reason- The audit log reason for the deletion.- Returns:
- A future to check if the deletion was successful.
-
getApproximateMemberCount
java.util.Optional<java.lang.Integer> getApproximateMemberCount()
Gets the approximate number of members for the target server.- Returns:
- The count of members, if available.
-
getApproximatePresenceCount
java.util.Optional<java.lang.Integer> getApproximatePresenceCount()
Gets the approximate number of online members for the target server.- Returns:
- The count of present members, if available.
-
getInviter
java.util.Optional<User> getInviter()
Gets the user who created the invite.- Returns:
- The user who created the invite, if available.
-
getTargetUser
java.util.Optional<User> getTargetUser()
Gets the user which the invite was created for.- Returns:
- The user which the invite was created for, if available.
-
getTargetUserType
java.util.Optional<TargetUserType> getTargetUserType()
Gets the user type which the invite was created for.- Returns:
- The user type which the invite was created for, if available.
-
-