Skip to main content

ClearCommand

This function was added in DSL 1

Description

Unregister a command from the current script. Nothing will happen if the command is not registered with the script, and no error will be raised.

function ClearCommand(command) --[[ ... ]] end

Parameters

  • command: string - The name of the command to unregister. This should be the same name used when registering the command with RegisterCommand.

Return Values

None.

Example

ClearCommand("my_custom_command")

See Also

  • DoesCommandExist: To check if a command is registered before attempting to clear it.
  • RegisterCommand: To register a command that can be executed in the script.