> ## Documentation Index
> Fetch the complete documentation index at: https://docs.typebot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Command Event

This event allows you to trigger a specifc flow when a command is sent to the bot. This command can be sent with an [continueChat HTTP request](https://docs.typebot.com/api-reference/chat/continue-chat.md) with a `command` message type or with the [Typebot.sendCommand](https://docs.typebot.com/deploy/web/html-javascript.md#commands) function if your bot is embedded on a website.

> [!NOTE]
>
> Looking to trigger behavior when the user **types** a keyword like `restart` or `help`? Use a [Reply event](https://docs.typebot.com/editor/events/reply.md) instead — the Command event is only for triggers sent programmatically from outside the chat. See the [user commands guide](https://docs.typebot.com/guides/user-commands.md) for a concrete example.

You assign a unique command name for each node and you can optionally resume the flow after the command is sent.

![Command event in Typebot editor](https://mintcdn.com/typebot/rHkgfCATWjP6ntzz/images/events/command.avif?fit=max\&auto=format\&n=rHkgfCATWjP6ntzz\&q=85\&s=faa5747533d257db4d651d4c01a4123d)

## Return to main flow

By default, when an event is executed, the session will end and not return to the main flow. Use a [Return block](https://docs.typebot.com/editor/blocks/logic/return.md) to return to the main flow. This allows you to have the flexibility to conditionally end the session.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.