Class SlashCommandUpdater



  • public class SlashCommandUpdater
    extends Object
    • Constructor Detail

      • SlashCommandUpdater

        public SlashCommandUpdater​(long commandId)
        Creates a new slash command updater.
        Parameters:
        commandId - The slash command id which should be updated.
    • Method Detail

      • setName

        public SlashCommandUpdater setName​(String name)
        Sets the new name of the slash command.
        Parameters:
        name - The name to set.
        Returns:
        The current instance in order to chain call methods.
      • setDescription

        public SlashCommandUpdater setDescription​(String description)
        Sets the new description of the slash command.
        Parameters:
        description - The description to set.
        Returns:
        The current instance in order to chain call methods.
      • setSlashCommandOptions

        public SlashCommandUpdater setSlashCommandOptions​(List<SlashCommandOption> slashCommandOptions)
        Sets the new slash command options.
        Parameters:
        slashCommandOptions - The slash command options to set.
        Returns:
        The current instance in order to chain call methods.
      • setDefaultPermission

        public SlashCommandUpdater setDefaultPermission​(boolean defaultPermission)
        Sets the new slash command default permission. When set to `false` no one will be able to use this command until you overwrite it. Disallowing the usage of this command includes absolutely every user even Administrators, Server owners and in direct messages.
        Parameters:
        defaultPermission - The default permission to set.
        Returns:
        The current instance in order to chain call methods.