Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python

Migrated from telethon to telegram bot api

Alishahryar1d958544c3d18
diff --git a/.env.example b/.env.example
index 7bb78ffd..12ed761c 100644
--- a/.env.example
+++ b/.env.example
@@ -48,14 +48,12 @@ NVIDIA_NIM_REASONING_EFFORT=high
NVIDIA_NIM_INCLUDE_REASONING=true
# ==================== Bot Wrapper Config ====================
-TELEGRAM_API_ID="123456"
-TELEGRAM_API_HASH="abcdef123456..."
+TELEGRAM_BOT_TOKEN=""
ALLOWED_TELEGRAM_USER_ID="YOUR_TELEGRAM_USER_ID"
CLAUDE_WORKSPACE="./agent_workspace"
ALLOWED_DIR="C:/Users/YourName/projects/myproject"
MAX_CLI_SESSIONS=10 # Maximum parallel Claude CLI instances
-WRAPPER_WS_URL="ws://localhost:8083/ws"
# Messaging Rate Limiting
-MESSAGING_RATE_LIMIT=1
-MESSAGING_RATE_WINDOW=3
\ No newline at end of file
+MESSAGING_RATE_LIMIT=10
+MESSAGING_RATE_WINDOW=1
\ No newline at end of file
diff --git a/README.md b/README.md
index 348aee37..bb637a5d 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,8 @@ NVIDIA_NIM_API_KEY=nvapi-your-key-here
BIG_MODEL=moonshotai/kimi-k2-thinking
SMALL_MODEL=moonshotai/kimi-k2-thinking
```
-Set Claude-Code to Sonnet for `BIG_MODEL` and Haiku for `SMALL_MODEL`
+
+Set Claude-Code to Sonnet for `BIG_MODEL` and Haiku for `SMALL_MODEL`
---
@@ -56,17 +57,16 @@ Control Claude Code remotely via Telegram! Send tasks from your phone and watch
#### Setup
-1. **Get Telegram API credentials** from [my.telegram.org](https://my.telegram.org):
- - Log in with your phone number
- - Go to "API Development Tools"
- - Create an app and copy your `api_id` and `api_hash`
+1. **Get a Bot Token**:
+ - Open Telegram and message [@BotFather](https://t.me/BotFather)
+ - Send `/newbot` and follow the prompts
+ - Copy the **HTTP API Token**
2. **Add to `.env`:**
```dotenv
-TELEGRAM_API_ID=12345678
-TELEGRAM_API_HASH=your_api_hash_here
-TELEGRAM_USER_ID=your_telegram_user_id
+TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrSTUvwxYZ
+ALLOWED_TELEGRAM_USER_ID=your_telegram_user_id
```
> 💡 To find your Telegram user ID, message [@userinfobot](https://t.me/userinfobot) on Telegram.
@@ -84,11 +84,9 @@ ALLOWED_DIRS=C:/Users/yourname/projects
uv run uvicorn server:app --host 0.0.0.0 --port 8082
```
-5. **Authenticate Telegram** (first run only):
- - The server will prompt for your phone number and code
- - This creates a `claude_bot.session` file for future runs
-
-#### Usage
+5. **Usage**:
+ - Send `/start` to your bot
+ - Send any text prompt to start a task
- **Send a message** to yourself on Telegram with a task
- Claude will respond with:
diff --git a/api/app.py b/api/app.py
index c0f85077..69868edc 100644
--- a/api/app.py
+++ b/api/app.py
@@ -37,7 +37,7 @@ async def lifespan(app: FastAPI):
cli_manager = None
try:
- if settings.telegram_api_id and settings.telegram_api_hash:
+ if settings.telegram_bot_token:
from messaging.telegram import TelegramPlatform
from messaging.handler import ClaudeMessageHandler
from messaging.session import SessionStore
@@ -71,7 +71,8 @@ async def lifespan(app: FastAPI):
# Create Telegram platform
messaging_platform = TelegramPlatform(
- session_path=os.path.join(data_path, "claude_bot.session")
+ bot_token=settings.telegram_bot_token,
+ allowed_user_id=settings.allowed_telegram_user_id,
)
# Create and register message handler
diff --git a/config/settings.py b/config/settings.py
index 2ac87fa1..224225e2 100644
--- a/config/settings.py
+++ b/config/settings.py
@@ -61,8 +61,9 @@ class Settings(BaseSettings):
nvidia_nim_include_reasoning: bool = True
# ==================== Bot Wrapper Config ====================
- telegram_api_id: Optional[str] = None
- telegram_api_hash: Optional[str] = None
+ telegram_bot_token: Optional[str] = None
+ telegram_api_id: Optional[str] = None # Deprecated
+ telegram_api_hash: Optional[str] = None # Deprecated
allowed_telegram_user_id: Optional[str] = None
claude_workspace: str = "./agent_workspace"
allowed_dir: str = ""
@@ -83,6 +84,7 @@ class Settings(BaseSettings):
# Handle empty strings for optional string fields
@field_validator(
"nvidia_nim_stop",
+ "telegram_bot_token",
"telegram_api_id",
"telegram_api_hash",
"allowed_telegram_user_id",
diff --git a/messaging/telegram.py b/messaging/telegram.py
index 82015c4e..80eba46b 100644
--- a/messaging/telegram.py
+++ b/messaging/telegram.py
@@ -1,7 +1,7 @@
"""
Telegram Platform Adapter
-Implements MessagingPlatform for Telegram using Telethon.
+Implements MessagingPlatform for Telegram using python-telegram-bot.
"""
import asyncio
@@ -14,71 +14,86 @@ from .models import IncomingMessage
logger = logging.getLogger(__name__)
-# Optional import - Telethon may not be installed
+# Optional import - python-telegram-bot may not be installed
try:
- from telethon import TelegramClient, events, errors
-
- TELETHON_AVAILABLE = True
+ from telegram import Update, Bot
+ from telegram.ext import (
+ Application,
+ CommandHandler,
+ MessageHandler,
+ ContextTypes,
+ filters,
+ )
+ from telegram.error import TelegramError, RetryAfter, NetworkError
+
+ TELEGRAM_AVAILABLE = True
except ImportError:
- TelegramClient = None
- events = None
- errors = None
- TELETHON_AVAILABLE = False
+ TELEGRAM_AVAILABLE = False
class TelegramPlatform(MessagingPlatform):
"""
Telegram messaging platform adapter.
- Uses Telethon for Telegram API access.
- Designed for personal use (sending messages to yourself).
+ Uses python-telegram-bot (BoT API) for Telegram access.
+ Requires a Bot Token from @BotFather.
"""
name = "telegram"
def __init__(
self,
- api_id: Optional[str] = None,
- api_hash: Optional[str] = None,
+ bot_token: Optional[str] = None,
allowed_user_id: Optional[str] = None,
- session_path: str = "claude_bot.session",
):
- if not TELETHON_AVAILABLE:
+ if not TELEGRAM_AVAILABLE:
raise ImportError(
- "Telethon is required for Telegram support. Install with: pip install telethon"
+ "python-telegram-bot is required. Install with: pip install python-telegram-bot"
)
- self.api_id = api_id or os.getenv("TELEGRAM_API_ID")
- self.api_hash = api_hash or os.getenv("TELEGRAM_API_HASH")
+ self.bot_token = bot_token or os.getenv("TELEGRAM_BOT_TOKEN")
self.allowed_user_id = allowed_user_id or os.getenv("ALLOWED_TELEGRAM_USER_ID")
- self.session_path = session_path
- self._client: Optional[TelegramClient] = None
+ if not self.bot_token:
+ # We don't raise here to allow instantiation for testing/conditional logic,
+ # but start() will fail.
+ logger.warning("TELEGRAM_BOT_TOKEN not set")
+
+ self._application: Optional[Application] = None
self._message_handler: Optional[
Callable[[IncomingMessage], Awaitable[None]]
] = None
self._connected = False
- # Cache entity objects to avoid flood wait errors
- self._entity_cache: Dict[str, Any] = {}
- self._limiter: Optional[GlobalRateLimiter] = None
+ self._limiter: Optional[Any] = None # Will be GlobalRateLimiter
async def start(self) -> None:
"""Initialize and connect to Telegram."""
- if not self.api_id or not self.api_hash:
- raise ValueError("TELEGRAM_API_ID and TELEGRAM_API_HASH are required")
+ if not self.bot_token:
+ raise ValueError("TELEGRAM_BOT_TOKEN is required")
+
+ # Build Application
+ builder = Application.builder().token(self.bot_token)
+ self._application = builder.build()
- self._client = TelegramClient(
- self.session_path,
- int(self.api_id),
- self.api_hash,
+ # Register Internal Handlers
+ # We catch ALL text messages and commands to forward them
+ self._application.add_handler(
+ MessageHandler(filters.TEXT & (~filters.COMMAND), self._on_telegram_message)
)
+ self._application.add_handler(CommandHandler("start", self._on_start_command))
+ # Catch-all for other commands if needed, or let them fall through
+ self._application.add_handler(
+ MessageHandler(filters.COMMAND, self._on_telegram_message)
+ )
+
+ # Initialize internal components
+ await self._application.initialize()
+ await self._application.start()
- # Register event handler
- @self._client.on(events.NewMessage())
- async def on_new_message(event):
- await self._handle_event(event)
+ # Start polling (non-blocking way for integration)
+ # allowed_updates=None (all)
+ await self._application.updater.start_polling(drop_pending_updates=False)
- await self._client.start()
self._connected = True
# Initialize rate limiter
@@ -86,64 +101,53 @@ class TelegramPlatform(MessagingPlatform):
self._limiter = await GlobalRateLimiter.get_instance()
- # Run in background
- asyncio.create_task(self._client.run_until_disconnected())
-
# Send startup notification
try:
- # Use allowed_user_id if set, otherwise "me"
- target = self.allowed_user_id if self.allowed_user_id else "me"
- await self.send_message(target, "🚀 **Claude Code Proxy is online!**")
+ target = self.allowed_user_id
+ if target:
+ await self.send_message(
+ target, "🚀 **Claude Code Proxy is online!** (Bot API)"
+ )
except Exception as e:
logger.warning(f"Could not send startup message: {e}")
- logger.info("Telegram platform started")
+ logger.info("Telegram platform started (Bot API)")
async def stop(self) -> None:
- """Disconnect from Telegram."""
- if self._client:
- await self._client.disconnect()
+ """Stop the bot."""
+ if self._application:
+ await self._application.updater.stop()
+ await self._application.stop()
+ await self._application.shutdown()
+
self._connected = False
logger.info("Telegram platform stopped")
- async def _get_entity(self, chat_id: str) -> Any:
- """Get entity object for a chat_id, using cache to avoid flood wait errors."""
- if chat_id in self._entity_cache:
- return self._entity_cache[chat_id]
-
- # Handle special IDs like "me"
- try:
- peer = int(chat_id)
- entity = await self._client.get_input_entity(peer=peer)
- except (ValueError, TypeError):
- # Probably "me" or a username
- entity = await self._client.get_input_entity(chat_id)
-
- self._entity_cache[chat_id] = entity
- return entity
-
async def send_message(
self,
chat_id: str,
text: str,
reply_to: Optional[str] = None,
- parse_mode: Optional[str] = None,
+ parse_mode: Optional[str] = "Markdown",
) -> str:
"""Send a message to a chat."""
- if not self._client:
- raise RuntimeError("Telegram client not connected")
+ if not self._application:
+ raise RuntimeError("Telegram application not initialized")
try:
- entity = await self._get_entity(chat_id)
- msg = await self._client.send_message(
- entity,
- text,
- reply_to=int(reply_to) if reply_to else None,
+ msg = await self._application.bot.send_message(
+ chat_id=chat_id,
+ text=text,
+ reply_to_message_id=int(reply_to) if reply_to else None,
parse_mode=parse_mode,
)
- return str(msg.id)
- except errors.FloodWaitError as e:
- logger.error(f"Telegram flood wait: {e.seconds}s")
+ return str(msg.message_id)
+ except RetryAfter as e:
+ logger.warning(f"Rate limited by Telegram, retry in {e.retry_after}s")
+ # In a real system, we might sleep, but for now we propagate or let the caller handle
+ raise
+ except TelegramError as e:
+ logger.error(f"Telegram API Error: {e}")
raise
async def edit_message(
@@ -151,36 +155,39 @@ class TelegramPlatform(MessagingPlatform):
chat_id: str,
message_id: str,
text: str,
- parse_mode: Optional[str] = None,
+ parse_mode: Optional[str] = "Markdown",
) -> None:
"""Edit an existing message."""
- if not self._client:
- raise RuntimeError("Telegram client not connected")
+ if not self._application:
+ raise RuntimeError("Telegram application not initialized")
try:
- entity = await self._get_entity(chat_id)
- await self._client.edit_message(
- entity,
- int(message_id),
- text,
+ await self._application.bot.edit_message_text(
+ chat_id=chat_id,
+ message_id=int(message_id),
+ text=text,
parse_mode=parse_mode,
)
- except errors.FloodWaitError as e:
- logger.error(f"Telegram flood wait on edit: {e.seconds}s")
+ except RetryAfter as e:
+ logger.warning(f"Rate limited on edit, retry in {e.retry_after}s")
raise
- except errors.MessageNotModifiedError:
- # Message content unchanged, ignore
- pass
+ except TelegramError as e:
+ if "Message is not modified" in str(e):
+ pass
+ else:
+ logger.error(f"Telegram Edit Error: {e}")
+ raise
async def queue_send_message(
self,
chat_id: str,
text: str,
reply_to: Optional[str] = None,
- parse_mode: Optional[str] = None,
+ parse_mode: Optional[str] = "Markdown",
fire_and_forget: bool = True,
) -> Optional[str]:
- """Enqueue a message to be sent."""
+ """Enqueue a message to be sent (using limiter)."""
+ # Note: Bot API handles limits better, but we still use our limiter for nice queuing
if not self._limiter:
return await self.send_message(chat_id, text, reply_to, parse_mode)
@@ -198,7 +205,7 @@ class TelegramPlatform(MessagingPlatform):
chat_id: str,
message_id: str,
text: str,
- parse_mode: Optional[str] = None,
+ parse_mode: Optional[str] = "Markdown",
fire_and_forget: bool = True,
) -> None:
"""Enqueue a message edit."""
@@ -227,37 +234,46 @@ class TelegramPlatform(MessagingPlatform):
@property
def is_connected(self) -> bool:
- """Check if connected to Telegram."""
- return self._connected and self._client is not None
+ """Check if connected."""
+ return self._connected
+
+ async def _on_start_command(
+ self, update: Update, context: ContextTypes.DEFAULT_TYPE
+ ) -> None:
+ """Handle /start command."""
+ await update.message.reply_text("👋 Hello! I am the Claude Code Proxy Bot.")
+ # We can also treat this as a message if we want it to trigger something
+ await self._on_telegram_message(update, context)
+
+ async def _on_telegram_message(
+ self, update: Update, context: ContextTypes.DEFAULT_TYPE
+ ) -> None:
+ """Handle incoming updates."""
+ if not update.message or not update.message.text:
+ return
+
+ user_id = str(update.effective_user.id)
+ chat_id = str(update.effective_chat.id)
- async def _handle_event(self, event: Any) -> None:
- """Handle incoming Telegram event."""
# Security check
if self.allowed_user_id:
- if str(event.sender_id) != str(self.allowed_user_id).strip():
- logger.debug(
- f"Ignored message from unauthorized user: {event.sender_id}"
- )
+ if user_id != str(self.allowed_user_id).strip():
+ logger.warning(f"Unauthorized access attempt from {user_id}")
return
- if not event.text:
- return
-
if not self._message_handler:
- logger.warning("No message handler registered")
return
- # Convert to platform-agnostic message
incoming = IncomingMessage(
- text=event.text,
- chat_id=str(event.chat_id),
- user_id=str(event.sender_id),
- message_id=str(event.id),
+ text=update.message.text,
+ chat_id=chat_id,
+ user_id=user_id,
+ message_id=str(update.message.message_id),
platform="telegram",
- reply_to_message_id=str(event.reply_to_msg_id)
- if event.reply_to_msg_id
+ reply_to_message_id=str(update.message.reply_to_message.message_id)
+ if update.message.reply_to_message
else None,
- raw_event=event,
+ raw_event=update,
)
try:
@@ -266,7 +282,7 @@ class TelegramPlatform(MessagingPlatform):
logger.error(f"Error handling message: {e}")
try:
await self.send_message(
- incoming.chat_id,
+ chat_id,
f"❌ **Error:** {str(e)[:200]}",
reply_to=incoming.message_id,
)
diff --git a/pyproject.toml b/pyproject.toml
index 7e206fc2..5b60286c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,9 +12,8 @@ dependencies = [
"python-dotenv>=1.0.0",
"tiktoken>=0.7.0",
"websockets>=13.0",
- "telethon>=1.35.0",
+ "python-telegram-bot>=21.0",
"pydantic-settings>=2.12.0",
- "cryptg>=0.5.2",
"aiolimiter>=1.2.1",
]
diff --git a/uv.lock b/uv.lock
index b0440656..c66b587a 100644
--- a/uv.lock
+++ b/uv.lock
@@ -56,13 +56,12 @@ version = "2.0.0"
source = { virtual = "." }
dependencies = [
{ name = "aiolimiter" },
- { name = "cryptg" },
{ name = "fastapi", extra = ["standard"] },
{ name = "httpx" },
{ name = "pydantic" },
{ name = "pydantic-settings" },
{ name = "python-dotenv" },
- { name = "telethon" },
+ { name = "python-telegram-bot" },
{ name = "tiktoken" },
{ name = "uvicorn" },
{ name = "websockets" },
@@ -78,13 +77,12 @@ dev = [
[package.metadata]
requires-dist = [
{ name = "aiolimiter", specifier = ">=1.2.1" },
- { name = "cryptg", specifier = ">=0.5.2" },
{ name = "fastapi", extras = ["standard"], specifier = ">=0.115.11" },
{ name = "httpx", specifier = ">=0.25.0" },
{ name = "pydantic", specifier = ">=2.0.0" },
{ name = "pydantic-settings", specifier = ">=2.12.0" },
{ name = "python-dotenv", specifier = ">=1.0.0" },
- { name = "telethon", specifier = ">=1.35.0" },
+ { name = "python-telegram-bot", specifier = ">=21.0" },
{ name = "tiktoken", specifier = ">=0.7.0" },
{ name = "uvicorn", specifier = ">=0.34.0" },
{ name = "websockets", specifier = ">=13.0" },
@@ -320,52 +318,6 @@ toml = [
{ name = "tomli", marker = "python_full_version <= '3.11'" },
]
-[[package]]
-name = "cryptg"
-version = "0.5.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/41/e0/d1b637d638513191793971b985151b48ac656d5fcce79771f1e5541a7acf/cryptg-0.5.2.tar.gz", hash = "sha256:d1577e219d040695f34ae7c2636c9ed769fe623813009e27dbc735beed69bd16", size = 13347, upload-time = "2025-10-12T08:39:51.185Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/bf/c6/7752a958e7fe98fab72f5c0859e95cb8d84c986f47558c23a20c64c74913/cryptg-0.5.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bbabe74b321415d5dbea58a30ef96ba53a196de57dd48c876266e0304ddaeb5d", size = 213724, upload-time = "2025-10-12T08:56:53.325Z" },
- { url = "https://files.pythonhosted.org/packages/4c/38/e40268c87f2ed6eb38983508d5657cdce18d8a35b173986c7e98cf33b750/cryptg-0.5.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:928264608c721032d407541fb2e6119a6e5b5d87d8ee244de5a68263301fcad7", size = 243529, upload-time = "2025-10-12T08:56:54.897Z" },
- { url = "https://files.pythonhosted.org/packages/61/18/780ecaeb290c34122d0c98f5a0089ad2163e323689d0c0ca88d1c1789599/cryptg-0.5.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:f05d56fe5aef63e3fcfc76714d41fb2b2378730551a455dd615d0fdd49fd9037", size = 255276, upload-time = "2025-10-12T08:56:55.965Z" },
- { url = "https://files.pythonhosted.org/packages/f1/4a/835d3e816a3187932bffc595c339ccea15c1063f7e8f27b65bbcaf2819d3/cryptg-0.5.2-cp310-cp310-win32.whl", hash = "sha256:c6806680964cad8723d110228fcf1cbdb40eebfbd19e91e4f55ebf48ce95a223", size = 112783, upload-time = "2025-10-12T08:56:57.281Z" },
- { url = "https://files.pythonhosted.org/packages/3a/20/eb3deb01237ba751b6c2c117c2ee4be0596ccd87d5dfbff4305b88df7783/cryptg-0.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:195a9f5f1a834ad8ac9989dcf95563f37e0332d734c64b4150e99cdb71f0bb53", size = 113641, upload-time = "2025-10-12T08:56:58.435Z" },
- { url = "https://files.pythonhosted.org/packages/ea/88/050a378998d9f14b88955d5e3119b0d5822830e42376ff69023c12a4108e/cryptg-0.5.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:40e6002f3dd522711b33fd8ace2424f295dd557251d255c6f0ab1cd7a6f8c662", size = 213527, upload-time = "2025-10-12T08:56:59.6Z" },
- { url = "https://files.pythonhosted.org/packages/b1/82/c977ae8906bed76b068e25ba70fecb7f8f79ba43be13a290a55ee527ee19/cryptg-0.5.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:ef778055445d451b4467cda4252a23cb659666012b97c43cce25d08b55f8fb4a", size = 243025, upload-time = "2025-10-12T08:57:00.71Z" },
- { url = "https://files.pythonhosted.org/packages/21/4e/fdd0ca11105c02dc7879f6df6e7b0f7ce7e85a262938d3f9657d450ba102/cryptg-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:682b19897ebef8a910fdfe5fc379689334fdc197cb17bb13763f27153c856cb2", size = 255120, upload-time = "2025-10-12T08:57:02.016Z" },
- { url = "https://files.pythonhosted.org/packages/02/04/f4834326b0aaff222a35f4b138fed51d5619627c2bd02c94a08f7ab6df21/cryptg-0.5.2-cp311-cp311-win32.whl", hash = "sha256:e83a0c9f141af8fe426c9967cec802ab01e207edb6aeb3fb8f0d94f9fbb76b92", size = 112529, upload-time = "2025-10-12T08:57:03.349Z" },
- { url = "https://files.pythonhosted.org/packages/22/de/edf6d5bcee436b5e3c764f25486c646fe47f5e18cdc0fad37bc6b4d96ab5/cryptg-0.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:b677d8e3be717c740a05eaf042e92e6f3e0f07dd3383bc4b1878b71cf4048d84", size = 113574, upload-time = "2025-10-12T08:57:04.773Z" },
- { url = "https://files.pythonhosted.org/packages/81/ea/4752cbd74369a27662960d9476918e549590ad91b68e911fffd106695dc7/cryptg-0.5.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:eb28fcde47e02421926dbb83dbb0793d21d783125b95bda68414e46c76b1c9e1", size = 211666, upload-time = "2025-10-12T08:57:05.671Z" },
- { url = "https://files.pythonhosted.org/packages/b1/ad/4873a1ecd602aed7618bcf2dce4099834c73423b4793bbe815b942ab67d2/cryptg-0.5.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:5f51de5fa87cca9c3b2c019eae0ba7f4a27fd0ac23a6b52970e14ab6e590c11f", size = 243573, upload-time = "2025-10-12T08:57:07.062Z" },
- { url = "https://files.pythonhosted.org/packages/34/2e/50fda8d43646db4be92071979722600440f852e70eda67379a55b686a376/cryptg-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:207c6c717c5e2d544f11523ce8c56982e40fbfc4b3a6eebf70e3e7b37c2be14e", size = 255038, upload-time = "2025-10-12T08:57:08.336Z" },
- { url = "https://files.pythonhosted.org/packages/1e/bf/e7fcb0887a8ec340b2f28a54dd2105b271e7574ae99eb1222bb8cb85cebc/cryptg-0.5.2-cp312-cp312-win32.whl", hash = "sha256:3c0c1edd348bbbebc5a6fd553cdeb861d85016c73dd5dfc368a0bee343a6fb25", size = 113108, upload-time = "2025-10-12T08:57:09.387Z" },
- { url = "https://files.pythonhosted.org/packages/02/a7/54c2a6f3559708a04023f31407628d6db3e2482b059b226dc3f4c41ffbe1/cryptg-0.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:c9b6ae5d30c3c164ac44b6b212887ed7d56f55e2fb207c7f93332ef2624fd936", size = 113710, upload-time = "2025-10-12T08:57:10.284Z" },
- { url = "https://files.pythonhosted.org/packages/a3/94/194f349abbef5c8b9d4a940a24e0063e75341a4b649222d6f18c8e6be2e6/cryptg-0.5.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:78256ecd112b16e2f2bd7b74bfce9b79068cb2304f3a7e847a2440908f780c36", size = 211720, upload-time = "2025-10-12T08:57:11.533Z" },
- { url = "https://files.pythonhosted.org/packages/4b/19/9fb12ec6f5f257c318a181f3127615c52ac03274a70a1078fd2ceb180742/cryptg-0.5.2-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:62cc487da7f842362619a839cf13e27cc7f59b4870f3dcbb58c3dd71649322e9", size = 243713, upload-time = "2025-10-12T08:57:12.481Z" },
- { url = "https://files.pythonhosted.org/packages/aa/28/1d55ecf9b058dc9376758aa71df83715bc6fe84eb6cf85a0af1c50345016/cryptg-0.5.2-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:1797c006ac9d4ddd08f141fc6718e16040eabca8defb6bdf7ded5946359aa375", size = 255031, upload-time = "2025-10-12T08:57:13.779Z" },
- { url = "https://files.pythonhosted.org/packages/3c/e9/57698ae2af522ac86d1af5b0788ceab07c92313201dea082eb1b6f6abb54/cryptg-0.5.2-cp313-cp313-win32.whl", hash = "sha256:8c0e9a58c8db6795e674130bbc0c055a0eff887075707e6b6285f6f52581442b", size = 113165, upload-time = "2025-10-12T08:57:14.683Z" },
- { url = "https://files.pythonhosted.org/packages/1c/3c/276e1034a93160a8908a61043b74fef028b8275f9b0cccb0353e48729e1d/cryptg-0.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:5dc1e0c39a243710773b834dc8880182bba6a0ff8da4ba7cd2a53c67e70dfa4e", size = 114024, upload-time = "2025-10-12T08:57:15.545Z" },
- { url = "https://files.pythonhosted.org/packages/80/7e/b8d7d30484c48fbb7b8d6262052b7bb05fd40b6dd14e044af3624fe2d2f2/cryptg-0.5.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:b57ca6c19dbd59eb2dd72d3ca289621b8f06db1073704dc9ac6fba2fbad7b782", size = 211427, upload-time = "2025-10-12T08:57:16.764Z" },
- { url = "https://files.pythonhosted.org/packages/86/e8/e30eee6f18d5a2f916f4c18d2625dc305df1d9ca08195fa629c46cba1b53/cryptg-0.5.2-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:a4475a567bf728b85a5c0399f487ec1e683bfb4a5dad9c3f4e771be1caa712fb", size = 243269, upload-time = "2025-10-12T08:57:17.823Z" },
- { url = "https://files.pythonhosted.org/packages/97/6c/cb0332af4c790f8912abffe5559fc4ffbf71a4471310b8f979cb4eb6429d/cryptg-0.5.2-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:bffb88636f2d00f8773bb6ae5d90e9963ce2e4dc49d4d108e813ed75ad2fb4c0", size = 254464, upload-time = "2025-10-12T08:57:19.164Z" },
- { url = "https://files.pythonhosted.org/packages/71/87/a95fc0c1d4f7ccb5c2069b7b54f72d1471042d7922008a0d50b99db84951/cryptg-0.5.2-cp314-cp314-win32.whl", hash = "sha256:721dfb2cd109a89e28d9bb3da892c56b16983cc59cf9b2268bacf94bd4d5abf3", size = 116303, upload-time = "2025-10-12T08:57:20.13Z" },
- { url = "https://files.pythonhosted.org/packages/71/83/0eb334c3fb563d74a061ee49a568f2cd392f4e0e83c35b67d8fd3111d1ef/cryptg-0.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:9269ad512124dd4a41824ab5dcc0a8e6697f8aa8f5fcd71fb34f8a4eebd5ec67", size = 116433, upload-time = "2025-10-12T08:57:20.966Z" },
- { url = "https://files.pythonhosted.org/packages/ff/f6/d49eecfbf76150fadfea6b778f396b22b3d779262697cdd94ade7701943a/cryptg-0.5.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:cc0e519e31b61633305ffd34803da3ea5c3414221a838ae85b487bcdee71a388", size = 211163, upload-time = "2025-10-12T08:57:21.838Z" },
- { url = "https://files.pythonhosted.org/packages/1c/ae/251f130b1bd2a54b2345b24a72ec6b69b3798c6bc55e880292f83db78928/cryptg-0.5.2-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:b67ce4d22532454aceac6c5afc30ba2cefb4b95fcfe74eea9affdb697fe59cc1", size = 243212, upload-time = "2025-10-12T08:57:22.814Z" },
- { url = "https://files.pythonhosted.org/packages/a5/1f/8bdda38d198cb8d459909599702361eb49db95c1a182be1b52b08db569cb/cryptg-0.5.2-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:4e2273d41eb8d3be60e190f0ae30c1492db41b6a49d4d3e769f9ba24da4402f5", size = 254612, upload-time = "2025-10-12T08:57:23.792Z" },
- { url = "https://files.pythonhosted.org/packages/8b/dd/70a10daab5d276a5f1fe5fe500446cff247e2082b971ae07d240a418d1a8/cryptg-0.5.2-cp314-cp314t-win32.whl", hash = "sha256:427ee363344a71882a3ba853c179b1d7d1ed0991e4fa8cf09e6f7418eda86237", size = 115715, upload-time = "2025-10-12T08:57:24.869Z" },
- { url = "https://files.pythonhosted.org/packages/41/48/f691dc55e4001482120886a84f6db0161c7b1d9e96343203f93d5ec530ca/cryptg-0.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:ce37d3634b56f5cacc8419f1f907589fee89bd8e2a37aa208a2f0eed32773da3", size = 116271, upload-time = "2025-10-12T08:57:26.048Z" },
- { url = "https://files.pythonhosted.org/packages/bb/3f/1e3881853448cd32c5f94987603cfaac270713d1d749eea1a78d6eece4c1/cryptg-0.5.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fdbeea1fb061b5a7bc273f6c6ed40cd7b7a05600305d4a8f7002c29b2555c95c", size = 215198, upload-time = "2025-10-12T08:57:39.044Z" },
- { url = "https://files.pythonhosted.org/packages/59/03/5d5d64a3f74595d8258b52ac934041a1dc24a046c9e9d7d8dff3b3938601/cryptg-0.5.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:08b15f841691fc71735aeace24107c0975c3a0e8806e65762492c961013d6e5d", size = 244530, upload-time = "2025-10-12T08:57:40.224Z" },
- { url = "https://files.pythonhosted.org/packages/94/16/f06e91ebd2023271f8fa272ec0e80d32085640b071cc4107a70feb51344e/cryptg-0.5.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:ee0d1c5371c34f31ec1bf0fba3c86257b5f19cf8e1411138ebc771e21509bd6a", size = 255904, upload-time = "2025-10-12T08:57:41.272Z" },
- { url = "https://files.pythonhosted.org/packages/44/41/133bbb63e58669f60349429782c67f309520a01f373326c87adc981a52c5/cryptg-0.5.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:11d3b512db21905d8b26bc1493ee45bbc73e3dd285cbb412539c05e256cd46aa", size = 114494, upload-time = "2025-10-12T08:57:42.266Z" },
- { url = "https://files.pythonhosted.org/packages/2e/64/0526cc46968630cd2e4f6637c83431a47296bb2c2d80cda0fcf779b365d5/cryptg-0.5.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:7da6a02027684c1c56d8e3a13a2341ec2fc67792036ed356dcc54bd08fdee485", size = 214875, upload-time = "2025-10-12T08:57:43.152Z" },
- { url = "https://files.pythonhosted.org/packages/58/e9/62042808e99bbb09896c57e047a317851595ac0c45d79ceed8a98254ac72/cryptg-0.5.2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:973e67117296bf0ad4dc21607fd699d9da3b95d66f6f39d981b522523e778f3f", size = 244198, upload-time = "2025-10-12T08:57:44.139Z" },
- { url = "https://files.pythonhosted.org/packages/1f/05/80feec5026430371208e0d53ca642b4706a59678590319890bbddb6dfe5a/cryptg-0.5.2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:74a6416ebff5af10f0d837c2790a55086efe3ae5115c0da50948d0c95f144c03", size = 255576, upload-time = "2025-10-12T08:57:45.094Z" },
- { url = "https://files.pythonhosted.org/packages/0e/d9/35f820588f581e5fbd5392abd299c08effde9184ed4b766d67b06e67f780/cryptg-0.5.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:bd2ea1261454ac415e4127a5bf3f4795bd404c9f1041bf98cf02a7e23ff253b7", size = 114253, upload-time = "2025-10-12T08:57:46.376Z" },
-]
-
[[package]]
name = "dnspython"
version = "2.7.0"
@@ -679,21 +631,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
]
-[[package]]
-name = "pyaes"
-version = "1.6.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/44/66/2c17bae31c906613795711fc78045c285048168919ace2220daa372c7d72/pyaes-1.6.1.tar.gz", hash = "sha256:02c1b1405c38d3c370b085fb952dd8bea3fadcee6411ad99f312cc129c536d8f", size = 28536, upload-time = "2017-09-20T21:17:54.23Z" }
-
-[[package]]
-name = "pyasn1"
-version = "0.6.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/fe/b6/6e630dff89739fcd427e3f72b3d905ce0acb85a45d4ec3e2678718a3487f/pyasn1-0.6.2.tar.gz", hash = "sha256:9b59a2b25ba7e4f8197db7686c09fb33e658b98339fadb826e9512629017833b", size = 146586, upload-time = "2026-01-16T18:04:18.534Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/44/b5/a96872e5184f354da9c84ae119971a0a4c221fe9b27a4d94bd43f2596727/pyasn1-0.6.2-py3-none-any.whl", hash = "sha256:1eb26d860996a18e9b6ed05e7aae0e9fc21619fcee6af91cca9bad4fbea224bf", size = 83371, upload-time = "2026-01-16T18:04:17.174Z" },
-]
-
[[package]]
name = "pydantic"
version = "2.10.6"
@@ -870,6 +807,19 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/45/58/38b5afbc1a800eeea951b9285d3912613f2603bdf897a4ab0f4bd7f405fc/python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104", size = 24546, upload-time = "2024-12-16T19:45:44.423Z" },
]
+[[package]]
+name = "python-telegram-bot"
+version = "22.6"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "httpcore", version = "1.0.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.14'" },
+ { name = "httpx" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/cd/9b/8df90c85404166a6631e857027866263adb27440d8af1dbeffbdc4f0166c/python_telegram_bot-22.6.tar.gz", hash = "sha256:50ae8cc10f8dff01445628687951020721f37956966b92a91df4c1bf2d113742", size = 1503761, upload-time = "2026-01-24T13:57:00.269Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/13/97/7298f0e1afe3a1ae52ff4c5af5087ed4de319ea73eb3b5c8c4dd4e76e708/python_telegram_bot-22.6-py3-none-any.whl", hash = "sha256:e598fe171c3dde2dfd0f001619ee9110eece66761a677b34719fb18934935ce0", size = 737267, upload-time = "2026-01-24T13:56:58.06Z" },
+]
+
[[package]]
name = "pyyaml"
version = "6.0.2"
@@ -1078,18 +1028,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/7e/1b/1c2f43af46456050b27810a7a013af8a7e12bc545a0cdc00eb0df55eb769/rich_toolkit-0.13.2-py3-none-any.whl", hash = "sha256:f3f6c583e5283298a2f7dbd3c65aca18b7f818ad96174113ab5bec0b0e35ed61", size = 13566, upload-time = "2025-01-13T19:29:59.795Z" },
]
-[[package]]
-name = "rsa"
-version = "4.9.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pyasn1" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz", hash = "sha256:e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75", size = 29034, upload-time = "2025-04-16T09:51:18.218Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/64/8d/0133e4eb4beed9e425d9a98ed6e081a55d195481b7632472be1af08d2f6b/rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762", size = 34696, upload-time = "2025-04-16T09:51:17.142Z" },
-]
-
[[package]]
name = "shellingham"
version = "1.5.4"
@@ -1120,19 +1058,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/a0/4b/528ccf7a982216885a1ff4908e886b8fb5f19862d1962f56a3fce2435a70/starlette-0.46.1-py3-none-any.whl", hash = "sha256:77c74ed9d2720138b25875133f3a2dae6d854af2ec37dceb56aef370c1d8a227", size = 71995, upload-time = "2025-03-08T10:55:32.662Z" },
]
-[[package]]
-name = "telethon"
-version = "1.42.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pyaes" },
- { name = "rsa" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/8c/10/8c8c9476bfce767a856d8aaf9eae8ea1869df4e970da16f1c5b638fd1b0c/telethon-1.42.0.tar.gz", hash = "sha256:032e95511261d5ead719f75494c6c85ece2ce71816b54f3c65d6ccc371d6994d", size = 672734, upload-time = "2025-11-05T19:15:19.849Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e4/e4/8ce0ff55251381966a7c3f88bd5b34abda79b225a8e7fb51ddef3b849c94/telethon-1.42.0-py3-none-any.whl", hash = "sha256:cf361c94586bcacd6d0fc8959a2bce509d1bb37007fe6476a80c4fb4a2decc29", size = 748466, upload-time = "2025-11-05T19:15:18.241Z" },
-]
-
[[package]]
name = "tiktoken"
version = "0.12.0"