Interface ApplicationCommand

    • Method Detail

      • getId

        long getId()
        Gets the unique id of this command.
        Specified by:
        getId in interface DiscordEntity
        Returns:
        The unique id of this command.
        See Also:
        Discord docs
      • getApplicationId

        long getApplicationId()
        Gets the unique id of the application that this command belongs to.
        Returns:
        The unique application id.
      • getType

        ApplicationCommandType getType()
        Gets the type of this application command.
        Returns:
        The type of this command.
      • getName

        String getName()
        Gets the name of this command.
        Returns:
        The name of this command.
      • getDescription

        String getDescription()
        Gets the description of this command.
        Returns:
        The description of this command.
      • getDefaultPermission

        boolean getDefaultPermission()
        Gets the default permission of this command.
        Returns:
        The default permission of this command.
      • getServer

        Optional<Server> getServer()
        Gets the server of this command if it is not global.
        Returns:
        The server of this command.
      • isGlobalApplicationCommand

        boolean isGlobalApplicationCommand()
        Gets whether this application command is global.
        Returns:
        If this application command is global or not.
      • isServerApplicationCommand

        boolean isServerApplicationCommand()
        Gets whether this application command is a server application command.
        Returns:
        If this application command is a server application command or not.
      • deleteGlobal

        CompletableFuture<Void> deleteGlobal()
        Deletes this application command globally.
        Returns:
        A future to check if the deletion was successful.
      • deleteForServer

        CompletableFuture<Void> deleteForServer​(Server server)
        Deletes this application command globally.
        Parameters:
        server - The server where the command should be deleted from.
        Returns:
        A future to check if the deletion was successful.