{"id":15177254,"url":"https://github.com/apidogru/multibot-sdk-ts","last_synced_at":"2025-09-10T08:32:11.735Z","repository":{"id":42912077,"uuid":"249832212","full_name":"APIdogRU/multibot-sdk-ts","owner":"APIdogRU","description":"Telegram and VK bot SDK for TypeScript","archived":false,"fork":false,"pushed_at":"2023-03-04T07:52:54.000Z","size":1412,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-26T00:03:51.608Z","etag":null,"topics":["telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/APIdogRU.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-24T22:30:06.000Z","updated_at":"2022-02-07T06:54:09.000Z","dependencies_parsed_at":"2024-10-11T05:20:59.568Z","dependency_job_id":null,"html_url":"https://github.com/APIdogRU/multibot-sdk-ts","commit_stats":{"total_commits":52,"total_committers":2,"mean_commits":26.0,"dds":"0.019230769230769273","last_synced_commit":"41d02004977e8dc47922f35d5be46477f7250c07"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIdogRU%2Fmultibot-sdk-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIdogRU%2Fmultibot-sdk-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIdogRU%2Fmultibot-sdk-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIdogRU%2Fmultibot-sdk-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/APIdogRU","download_url":"https://codeload.github.com/APIdogRU/multibot-sdk-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232518614,"owners_count":18535993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["telegram","telegram-bot"],"created_at":"2024-09-27T14:04:28.730Z","updated_at":"2025-01-04T20:41:11.148Z","avatar_url":"https://github.com/APIdogRU.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multibot SDK\n## Install\n\n## Telegram\nConstructor config fields:\n* `secret` - token from BotFather;\n* `apiUrl` - (for debug purposes only) forward traffic through proxies in countries with government blocking;\n\n### Usage example\nFirstly, create instance of `Telegram.Bot`:\n```typescript\nimport { Telegram } from '@apidog/multibot-sdk-ts';\n\n// Create instance\nconst bot = new Telegram.Bot({\n    secret: '...', // secret key\n});\n```\n\n#### Handle new messages\n```typescript\nbot.on(Telegram.MatchType.Message, ({ message, from, chat }) =\u003e {\n    bot.sendMessage({\n        chat_id: chat.id,\n        text: `Hello, ${from.first_name}!`,\n    });\n});\n\nbot.startPolling();\n```\n\n#### Build and using keyboards\nList of available keyboards:\n* `ReplyKeyboard`;\n* `InlineKeyboard`;\n* `ForceReply`;\n* `RemoveKeyboard`.\n\n```typescript\n// create keyboard\nconst kb = new Telegram.ReplyKeyboardBuilder();\n\n// add row\nconst row = kb.addRow();\n\n// add button to row\nrow.addButton(new Telegram.ReplyButton('Click me!'));\n\nbot.sendMessage({\n    // ... rest parameters ...\n\n    // build keyboard\n    reply_markup: kb.build(),\n});\n```\n\n#### Upload photo/video/audio/file\nUsing the example of sending a photo:\n```typescript\n// 1. URL\nconst photo: string = 'https://telegram.org/img/t_logo.png';\n\n// 2. File id\nconst photo: string = '123456789abcdefghi';\n\n// 3. Local path\nimport * as fs from 'fs';\nconst photo: string = path.resolve('photo.jpg');\n\n// 4. Buffer (for example, page = puppeteer.Page)\nconst photo: Buffer = await page.screenshot();\n\n// 5. fs.ReadStream\nimport * as fs from 'fs';\nimport * as path from 'path';\nconst photo: fs.ReadStream = fs.createReadStream(path.resolve('photo.jpg'));\n\nbot.sendPhoto({\n    // ... rest parameters ...\n\n    // passing one variable of the above\n    photo,\n\n    // you can specify the filename if you are passing Buffer\n    __filename: '',\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapidogru%2Fmultibot-sdk-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapidogru%2Fmultibot-sdk-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapidogru%2Fmultibot-sdk-ts/lists"}