Class SlashCmd


  • public class SlashCmd
    extends Object
    The container for Slash Commands.
    Author:
    Jeffrey Morris
    • Constructor Detail

      • SlashCmd

        public SlashCmd​(String name,
                        String description,
                        Optional<List<org.javacord.api.interaction.SlashCommandOption>> options,
                        Optional<List<org.javacord.api.interaction.SlashCommandPermissions>> permissions,
                        Optional<org.javacord.api.entity.server.Server> server,
                        CmdExecutor executor)
        Creates a new SlashCmd object.
        Parameters:
        name - The name of the command.
        description - The description of the command.
        options - The options of the command.
        permissions - The permissions of the command.
        server - The server the command is on.
        executor - The executor of the command.
        See Also:
        Optional
    • Method Detail

      • getName

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

        public String getDescription()
        Gets the description of the command.
        Returns:
        The description of the command.
      • getOptions

        public Optional<List<org.javacord.api.interaction.SlashCommandOption>> getOptions()
        Gets the options of the command.
        Returns:
        The options of the command.
        See Also:
        Optional
      • getPermissions

        public Optional<List<org.javacord.api.interaction.SlashCommandPermissions>> getPermissions()
        Gets the permissions of the command.
        Returns:
        The permissions of the command.
        See Also:
        Optional
      • getServer

        public Optional<org.javacord.api.entity.server.Server> getServer()
        Gets the server the command is on.
        Returns:
        The server the command is on.
        See Also:
        Optional
      • getExecutor

        public CmdExecutor getExecutor()
        Gets the executor of the command.
        Returns:
        The executor of the command.