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

fixed server start message on telegram

Alishahryar1fb845384f066
diff --git a/.env.example b/.env.example
index e13e1797..7bb78ffd 100644
--- a/.env.example
+++ b/.env.example
@@ -57,5 +57,5 @@ MAX_CLI_SESSIONS=10 # Maximum parallel Claude CLI instances
WRAPPER_WS_URL="ws://localhost:8083/ws"
# Messaging Rate Limiting
-MESSAGING_RATE_LIMIT=1 # Number of requests
-MESSAGING_RATE_WINDOW=2 # Every N seconds (1 req / 2 sec)
\ No newline at end of file
+MESSAGING_RATE_LIMIT=1
+MESSAGING_RATE_WINDOW=3
\ No newline at end of file
diff --git a/messaging/telegram.py b/messaging/telegram.py
index 2f6bb3fe..82015c4e 100644
--- a/messaging/telegram.py
+++ b/messaging/telegram.py
@@ -91,8 +91,9 @@ class TelegramPlatform(MessagingPlatform):
# Send startup notification
try:
- # Send message to yourself using the special 'me' entity or chat_id
- await self.send_message("me", "🚀 **Claude Code Proxy is online!**")
+ # 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!**")
except Exception as e:
logger.warning(f"Could not send startup message: {e}")
@@ -110,8 +111,14 @@ class TelegramPlatform(MessagingPlatform):
if chat_id in self._entity_cache:
return self._entity_cache[chat_id]
- # Get entity and cache it
- entity = await self._client.get_input_entity(peer=int(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