# Commands Blocker

{% hint style="danger" %}
⭐ This plugin is private! Can be purchased on our [Discord Marketplace](https://discord.com/invite/Tzmq98gwqF).
{% endhint %}

{% hint style="info" %}
It is used to block certain commands from other CounterStrikeSharp plugins for players who do not have a linked Discord account or a specific Discord role.<br>

> The plugin includes a very simple configuration where you can set a list of blocked commands, specify who can use the commands, and add custom response messages for when a player is unable to use a command.
> {% endhint %}

<details>

<summary>Config Preview</summary>

```json
{
  "Not Linked Message": "{darkred}[!]{default} You must have a linked Discord account to use this command! ({green}/link{default})",
  "Blocked Commands": {
    "ws": {
      "Roles": [], // If you only want the command for Linked Players, do not specify any Roles for this command.
      "NoPermisionText": ""
    },
    "knife": {
      "Roles": [
        "YOUR ROLE ID"
      ],
      "NoPermisionText": "{darkred}[!]{default} You do not have permission to use the knife command."
    },
    "ban": {
      "Roles": [
        "OWNER ROLE ID",
        "ADMIN ROLE ID"
      ],
      "NoPermisionText": "{darkred}[!]{default} To use this command, you must have the {green}ADMIN{default} role on our Discord server."
    }
  },
  "ConfigVersion": 1
}
```

</details>

<div align="center"><figure><img src="/files/vuYfJs9HtogElLhP6l6T" alt=""><figcaption></figcaption></figure> <figure><img src="/files/Y9qydsRnN2thkxCQWG3W" alt=""><figcaption></figcaption></figure></div>


---

# 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.sourcefactory.eu/discord-utilities/modules/commands-blocker.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.
