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

# Camel.bots.telegram bot

<a id="camel.bots.telegram_bot" />

<a id="camel.bots.telegram_bot.TelegramBot" />

## TelegramBot

```python theme={"system"}
class TelegramBot:
```

Represents a Telegram bot that is powered by an agent.

**Parameters:**

* **chat\_agent** (ChatAgent): Chat agent that will power the bot.
* **telegram\_token** (str, optional): The bot token.

<a id="camel.bots.telegram_bot.TelegramBot.__init__" />

### **init**

```python theme={"system"}
def __init__(
    self,
    chat_agent: ChatAgent,
    telegram_token: Optional[str] = None
):
```

<a id="camel.bots.telegram_bot.TelegramBot.run" />

### run

```python theme={"system"}
def run(self):
```

Start the Telegram bot.

<a id="camel.bots.telegram_bot.TelegramBot.on_message" />

### on\_message

```python theme={"system"}
def on_message(self, message: 'Message'):
```

Handles incoming messages from the user.

**Parameters:**

* **message** (types.Message): The incoming message object.
