Interface Invite

  • All Known Subinterfaces:
    RichInvite


    public interface Invite
    This class represents an invite object. Invite objects won't receive any updates!
    • 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.