> ## Documentation Index
> Fetch the complete documentation index at: https://fossabot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# $(index)

Returns an argument provided at a specified argument index following a command name.

You can also use the shorter `$(2)` syntax, or [**\$(start:end)**](/docs/variables/argument-range) to return a range of arguments.

#### Parameters

This variable takes **one** *optional* parameter that is a **fallback response**, that will be returned if no argument at the specified argument index is provided.

## Example Usage

* A command with the name `!verycoolname` and a response of the following:

  ```
  $(index2 this is a fallback response)
  ```

  If triggered by `!verycoolname test1 test2 test3`, would return the following response:

  ```
  test2
  ```

  And if triggered by either `!verycoolname` or `!verycoolname test1`, would return the following response:

  ```
  this is a fallback response
  ```

#### Error Output

* In case no argument at the specified argument index is provided, as well as no fallback response, returns the following:

  ```
  [Error: Index <index> is not in arguments.]
  ```


## Related topics

- [$(start:end)](/docs/variables/argument-range.md)
- [$(quote)](/docs/variables/quote.md)
- [$(fromindex)](/docs/variables/fromindex.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.