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 CompletableFuture<Void>delete()Deletes the invite.CompletableFuture<Void>delete(String reason)Deletes the invite.Optional<Integer>getApproximateMemberCount()Gets the approximate number of members for the target server.Optional<Integer>getApproximatePresenceCount()Gets the approximate number of online members for the target server.Optional<ServerChannel>getChannel()Gets the channel of the invite.longgetChannelId()Gets the id of the channel.StringgetChannelName()Gets the name of the channel.ChannelTypegetChannelType()Gets the type of the channel.StringgetCode()Gets the code of the invite.Optional<User>getInviter()Gets the user who created the invite.Optional<Server>getServer()Gets the server of the invite.Optional<Icon>getServerIcon()Gets the icon of the server.longgetServerId()Gets the id of the server.StringgetServerName()Gets the name of the server.Optional<Icon>getServerSplash()Gets the splash of the server.Optional<User>getTargetUser()Gets the user which the invite was created for.Optional<TargetUserType>getTargetUserType()Gets the user type which the invite was created for.default URLgetUrl()Gets the url of the invite.
-
-
-
Method Detail
-
getCode
String getCode()
Gets the code of the invite.- Returns:
- The code of the invite.
-
getUrl
default URL getUrl()
Gets the url of the invite.- Returns:
- The url of the invite.
-
getServer
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
String getServerName()
Gets the name of the server.- Returns:
- The name of the server.
-
getServerIcon
Optional<Icon> getServerIcon()
Gets the icon of the server.- Returns:
- The icon of the server.
-
getServerSplash
Optional<Icon> getServerSplash()
Gets the splash of the server.- Returns:
- The splash of the server.
-
getChannel
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
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 CompletableFuture<Void> delete()
Deletes the invite.- Returns:
- A future to check if the deletion was successful.
-
delete
CompletableFuture<Void> delete(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
Optional<Integer> getApproximateMemberCount()
Gets the approximate number of members for the target server.- Returns:
- The count of members, if available.
-
getApproximatePresenceCount
Optional<Integer> getApproximatePresenceCount()
Gets the approximate number of online members for the target server.- Returns:
- The count of present members, if available.
-
getInviter
Optional<User> getInviter()
Gets the user who created the invite.- Returns:
- The user who created the invite, if available.
-
getTargetUser
Optional<User> getTargetUser()
Gets the user which the invite was created for.- Returns:
- The user which the invite was created for, if available.
-
getTargetUserType
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.
-
-