Skip to main content

DoesCommandExist

This function was added in DSL 1

Description

Check if a command exists. This does not check if it is associated with the current script, but only if it exists at all.

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

Parameters

  • command: string - The name of the command to check for existence.

Return Values

  • exist: boolean - Returns true if the command exists, otherwise false.

Example

if DoesCommandExist("my_command") then
print("Command exists!")
else
print("Command does not exist.")
end

See Also