Interface SlashCommand

    • 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.
      • 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.
      • getOptions

        List<SlashCommandOption> getOptions​()
        Gets a list with all options (i.e., parameters) for this command.
        Returns:
        A list with all options (i.e., parameters) for this command.
      • getDefaultPermission

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

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

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

        default SlashCommandUpdater createSlashCommandUpdater​()
        Creates an slash command updater from this SlashCommand instance.
        Returns:
        The slash command updater for this SlashCommand instance.