Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

telegram-bot-api-types

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

telegram-bot-api-types - npm Package Compare versions

Comparing version 7.9.3 to 7.9.4

2

package.json
{
"name": "telegram-bot-api-types",
"version": "7.9.3",
"version": "7.9.4",
"description": "Telegram Bot API types",

@@ -5,0 +5,0 @@ "repository": "git@github.com:TBXark/telegram-bot-api-types.git",

# @types/telegram-bot-api
This is a `d.ts` file for Telegram Bot API. It is based on the official [Telegram Bot API](https://core.telegram.org/bots/api) documentation.
A 0KB Telegram Bot API SDK that only includes type definition files. It can be used to conveniently develop Telegram Bots in TypeScript.
This is a `d.ts` file for Telegram Bot API. It is based on the official [Telegram Bot API](https://core.telegram.org/bots/api) documentation.
![](./preview.jpg)
### Installation

@@ -14,5 +18,7 @@

You can use any HTTP request library you want to encapsulate your API client. Here is a simple example:
```typescript
import type { GetFileRequest, GetMeRequest, SendPhotoRequest, BotMethod } from ".";
import type { GetFileRequest, GetMeRequest, SendPhotoRequest, BotMethod, AllBotMethods } from ".";

@@ -72,3 +78,4 @@ class APIClientBase {

type APIClient = APIClientBase & GetFileRequest & SendPhotoRequest & GetMeRequest;
// type APIClient = APIClientBase & GetFileRequest & SendPhotoRequest & GetMeRequest; // You can use this type if you want to implement the methods one by one.
type APIClient = APIClientBase & AllBotMethods // Or you can use this type to include all methods at once.

@@ -98,4 +105,9 @@ export function createAPIClient(token: string): APIClient {

## Known Issues
- Missing return type for methods, Maybe in the future, I will add return types for methods by parsing the official documentation with a ChatGPT.
## License
**@types/telegram-bot-api** is released under the MIT license. [See LICENSE](LICENSE) for details.

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc