{"repo":"Borodin/typescript-telegram-bot-api","free":true,"listed":false,"github":"https://github.com/Borodin/typescript-telegram-bot-api","clone":"git clone https://github.com/Borodin/typescript-telegram-bot-api.git","description":"Telegram Bot API wrapper for Node.js written in TypeScript","language":"TypeScript","stars":49,"topics":["api","bot","chatbot","nodejs","telegram","typescript"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"📦 typescript-telegram-bot-api This is a TypeScript wrapper for the Telegram Bot API Node.js and browsers. It allows you to easily interact with the Telegram Bot API using TypeScript. Check out the browser live demo here: StarExplorer. Installation Usage Supported Methods Descriptions of methods can be found at https://core.telegram.org/bots/api#available-methods. Method names and parameters correspond to those in the official API documentation. Each method returns a Promise that resolves with data received from the API. In case of an API error, the Promise will be rejected with a TelegramError containing the error code and description from the API. If the API error includes a retry after field, the library will retry the request after the specified number of seconds, until a response without an error is received. This behavior can be disabled by setting the autoRetry parameter to false . If the error is not related to the API, the Promise will be rejected with a different error. For sending files, you can use not only or , but also or . To send files with additional parameters, such as a filename or specific contentType, use the wrapper class. Events TelegramBot is an EventEmitter that emits the Update event and also emits events for each type of Message, such as message:audio , when the audio field is present in the message object. Error Handling Wrap asynchronous calls in try...catch blocks or use .catch() on promises to handle exceptions properly. Webhooks To use webhooks","default_branch":null,"files":null,"tree":[],"storefront":"/r/Borodin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Borodin/typescript-telegram-bot-api/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}