# kcode-telegram-text-delivery
This crate exposes two asynchronous operations:
```rust
pub async fn send_telegram_text(
bot: &teloxide::Bot,
chat_id: i64,
text: &str,
reply_to_message_id: Option<i64>,
) -> Result<Vec<teloxide::types::Message>, teloxide::RequestError>
pub async fn send_telegram_message(
bot: &teloxide::Bot,
chat_id: teloxide::types::ChatId,
text: impl Into<String>,
) -> Result<teloxide::types::Message, teloxide::RequestError>
```
`send_telegram_text` splits text into sequential messages of at most 4,000 UTF-16 code units without changing or dropping bytes. When `reply_to_message_id` fits Telegram's signed 32-bit `MessageId`, reply parameters with `allow_sending_without_reply` are attached only to the first chunk; an out-of-range ID is ignored.
`send_telegram_message` sends one message without splitting.
Each Telegram `send_message` request is handled by the exact-pinned request policy under the `send_message` operation name. Chunk sends are sequential. An error stops later chunks and returns no collection of earlier successes, although Telegram may already have accepted them. Retries can duplicate a message if Telegram accepted it but its response was lost. This crate provides no durable outbox or exactly-once delivery guarantee.