| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- {
- "id": "telegram",
- "name": "Telegram Bot",
- "description": "Telegram Bot API integration with long polling via background worker. Messages are forwarded to the LLM and replies are sent back automatically.",
- "version": "3.2.0",
- "author": "Ferenc Szontagh & Zoë",
- "runtime": "quickjs",
- "sdkVersion": 1,
- "auto_start": true,
- "config": [
- {
- "key": "bot_token",
- "label": "Telegram Bot API token (from @BotFather)",
- "secret": true
- },
- {
- "key": "authorized_user_id",
- "label": "Authorized Telegram user ID (only this user can interact with the bot)",
- "secret": false
- },
- {
- "key": "polling_enabled",
- "label": "Enable long polling (recommended for private use, no public URL needed)",
- "secret": false,
- "default": "true"
- },
- {
- "key": "polling_interval",
- "label": "Polling interval in milliseconds (recommended: 2000-5000)",
- "secret": false,
- "default": "2000"
- },
- {
- "key": "polling_timeout",
- "label": "Long polling timeout in seconds (recommended: 25-30)",
- "secret": false,
- "default": "30"
- }
- ],
- "tools": [
- {
- "name": "send_message",
- "description": "Send a text message to a Telegram chat",
- "parameters": {
- "type": "object",
- "properties": {
- "chat_id": { "type": "string", "description": "Target chat ID or @username" },
- "text": { "type": "string", "description": "Message text (1-4096 characters)" },
- "parse_mode": { "type": "string", "description": "Text formatting mode", "enum": ["HTML", "Markdown", "MarkdownV2"] },
- "disable_notification": { "type": "boolean", "description": "Send silently" },
- "reply_to_message_id": { "type": "integer", "description": "Reply to message ID" }
- },
- "required": ["chat_id", "text"]
- }
- },
- {
- "name": "send_to_owner",
- "description": "Send a message to the authorized user (bot owner)",
- "parameters": {
- "type": "object",
- "properties": {
- "text": { "type": "string", "description": "Message text (1-4096 characters)" },
- "parse_mode": { "type": "string", "description": "Text formatting mode", "enum": ["HTML", "Markdown", "MarkdownV2"] }
- },
- "required": ["text"]
- }
- },
- {
- "name": "send_photo",
- "description": "Send a photo to a Telegram chat",
- "parameters": {
- "type": "object",
- "properties": {
- "chat_id": { "type": "string", "description": "Target chat ID" },
- "photo": { "type": "string", "description": "Photo URL or file_id" },
- "caption": { "type": "string", "description": "Photo caption" },
- "parse_mode": { "type": "string", "description": "Caption formatting mode", "enum": ["HTML", "Markdown", "MarkdownV2"] }
- },
- "required": ["chat_id", "photo"]
- }
- },
- {
- "name": "send_document",
- "description": "Send a document/file to a Telegram chat",
- "parameters": {
- "type": "object",
- "properties": {
- "chat_id": { "type": "string", "description": "Target chat ID" },
- "document": { "type": "string", "description": "Document URL or file_id" },
- "caption": { "type": "string", "description": "Document caption" },
- "parse_mode": { "type": "string", "description": "Caption formatting mode", "enum": ["HTML", "Markdown", "MarkdownV2"] }
- },
- "required": ["chat_id", "document"]
- }
- },
- {
- "name": "forward_message",
- "description": "Forward a message from one chat to another",
- "parameters": {
- "type": "object",
- "properties": {
- "chat_id": { "type": "string", "description": "Target chat ID" },
- "from_chat_id": { "type": "string", "description": "Source chat ID" },
- "message_id": { "type": "integer", "description": "Message ID to forward" }
- },
- "required": ["chat_id", "from_chat_id", "message_id"]
- }
- },
- {
- "name": "get_me",
- "description": "Get bot information",
- "parameters": { "type": "object", "properties": {} }
- },
- {
- "name": "get_chat",
- "description": "Get chat information",
- "parameters": {
- "type": "object",
- "properties": {
- "chat_id": { "type": "string", "description": "Chat ID" }
- },
- "required": ["chat_id"]
- }
- },
- {
- "name": "set_webhook",
- "description": "Set webhook URL for the bot (alternative to polling)",
- "parameters": {
- "type": "object",
- "properties": {
- "webhook_url": { "type": "string", "description": "Public HTTPS URL for webhook" },
- "secret_token": { "type": "string", "description": "Optional secret token for verification" }
- },
- "required": ["webhook_url"]
- }
- },
- {
- "name": "delete_webhook",
- "description": "Delete webhook and switch to polling mode",
- "parameters": { "type": "object", "properties": {} }
- },
- {
- "name": "get_webhook_info",
- "description": "Get current webhook configuration",
- "parameters": { "type": "object", "properties": {} }
- }
- ],
- "permissions": {
- "allowNetwork": true,
- "allowStorage": true,
- "allowFiles": true
- }
- }
|