# User Command

**Introduction**&#x20;

Activates when a user executes a specified command.

**Configuration**

1. **Command**: Set the command to trigger the response (1-32 characters).
2. **Permissions**: Specify required permissions for using this command. If empty, it's accessible to all.
3. **Guild Only**: For custom bots, enable this to restrict the command to guild channels, excluding DMs.

**Variables**

1. **User**: Identifies the user who executed the command.
2. **Target**: The target of the command.
3. **Channel**: The channel where the command was used.
4. **Interaction**: The interaction object from the command execution. Use this to reply to the command with the 'Reply to Interaction' step.

**Usage**&#x20;

Ideal for custom interactive commands, enabling specific actions or responses based on the command and user interaction.

**Troubleshooting**&#x20;

Check the command setup and configuration to ensure it aligns with the intended use.


---

# 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.flexy.bot/modules/discord/triggers/user-command.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.
