> For the complete documentation index, see [llms.txt](https://docs.sourcefactory.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sourcefactory.eu/discord-utilities/modules/commands-blocker.md).

# 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>
