> For the complete documentation index, see [llms.txt](https://rahulps1000.gitbook.io/pyropatch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rahulps1000.gitbook.io/pyropatch/patches/command-handler.md).

# Command Handler

Advanced Functionality for Bot Commands

Patch Command Handler

```
from pyrogram import Client
from pyropatch import command_handler

app = Client(...)
```

#### Features

Pass Command Info When Creating Command

```
from pyrogram import Client
from pyropatch import command_handler                   #apply command handler

app = Client(...)

#pass info along with commands in command filter
@app.on_message(filters.command(commands='start',info='Check Bot is Alive'))
```

Get all the added command and its info using Pyrogram Client

```
from pyrogram import Client
from pyropatch import command_handler                   #apply command handler

app = Client(...)

# to get all the commands available in bot
commands = app.commands
```

Set Bot Commands with all commands available in bot

```
from pyrogram import Client
from pyropatch import command_handler                   #apply command handler

app = Client(...)

# to set bot commands from the command available on bot
await app.auto_set_commands()
```
