# runCommand

```lua
return function()
    --running quietly as true will prevent regular commands from responding in chat.
    --however a commany may still output a response
    
    --!mass forces all users to run the command jump 
    --**assuming nothing else is controlling the state of avatars.
    --**assuming everyone has access to the jump command / shop restrictions
    runCommand('!mass jump', false); 
    
    --runCommand('!change clonzeh !jump', false);
    --!change will try to run the command as a different user.
    
    --runCommand('!jump', false); 
    --by just running jump, it will make the broadcaster's avatar jump.
end
```

{% hint style="info" %}
By issuing runCommand, it will send the command as the streamer/broadcaster.
{% endhint %}

{% hint style="info" %}
To send a command as another user, you will need to use the change command:

&#x20;example: '!change clonzeh !jump'

otherwise, you can find a runCommand within the User class.
{% endhint %}

{% hint style="info" %}
In this example, sendQuietly is set to false. (the second paramenter)

This means that command will try not to respond, unless overridden by the command itself.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.streamavatars.com/lua-scripting-api/api-reference-and-tips/global-functions/runcommand.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
