# Telegram Bot Sample

Demonstrates the Telegram Bot connector (`TelegramBotConnector`): sending messages via the Telegram Bot API, schema validation, and webhook update processing.

## What it shows

* Building a `Message` with text, media, or location content for a Telegram chat
* Sending via `IMessagingClient` using the `telegram` channel name
* Validating messages against the Telegram channel schema before sending
* Viewing the channel schema, capabilities, and parameters
* Checking connector runtime status

## Run

```bash
cd samples/telegram-bot
./run.sh -- telegram <command>
```

## Commands

| Command              | Description                                          |
| -------------------- | ---------------------------------------------------- |
| `schema [name]`      | Show the Telegram channel schema                     |
| `configure`          | Prompt for Bot Token, Chat ID, and other settings    |
| `send`               | Build and send a live Telegram message interactively |
| `validate -k <kind>` | Validate a sample message (`text` or `location`)     |
| `status`             | Show connector runtime status                        |

## Example

```bash
./run.sh -- telegram configure
./run.sh -- telegram send
```

You will be prompted to select the message type (Text, Media, or Location) and compose the content.


---

# 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://ratatosk.deveel.org/samples/telegram-bot.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.
