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

tg-yarl

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tg-yarl - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "tg-yarl",
"author": "Alexey Bystrov <strikeentco@gmail.com>",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple Promise based wrapper over Telegram Bot Api with additional features.",

@@ -6,0 +6,0 @@ "engines": {

@@ -5,3 +5,3 @@ tg-yarl

A simple `Promise` based wrapper over Telegram Bot Api with additional features.
A simple `Promise` based wrapper over Telegram Bot API with additional features.

@@ -13,8 +13,8 @@ ```sh

```js
const Api = require('tg-yarl')('YOUR_TELEGRAM_BOT_TOKEN');
const api = require('tg-yarl')('YOUR_TELEGRAM_BOT_TOKEN');
Api.setWebhook('https://example.com/bot', './certificate.pem');
Api.getMe().then(res => console.log(res.body));
api.setWebhook('https://example.com/bot', './certificate.pem');
api.getMe().then(res => console.log(res.body));
Api
api
.sendPhoto('chatId', './anonim.jpg', {caption: 'Anonymous'})

@@ -26,3 +26,3 @@ .then(res => console.log(res.body));

All methods return a `Promise`, unless otherwise indicated.
All methods return a `Promise`.

@@ -216,3 +216,3 @@ ## [getMe()](https://core.telegram.org/bots/api#getme)

```js
Api.downloadFile('AgADAgADjagxGxAR6gbMzfh8LDtkU-9GhCoABOmH973MjLOBq7sAAgI', './file.jpg');
api.downloadFile('AgADAgADjagxGxAR6gbMzfh8LDtkU-9GhCoABOmH973MjLOBq7sAAgI', './file.jpg');
```

@@ -237,13 +237,13 @@

```js
Api.setKeyboard().sendMessage('chatId', 'Text');
api.setKeyboard().sendMessage('chatId', 'Text');
//or
Api.setKeyboard(true);
Api.sendMessage('chatId', 'Text');
api.setKeyboard(true);
api.sendMessage('chatId', 'Text');
```
If you want to hide the keyboard to specific users only, then do this:
```js
Api.setKeyboard(true, true).sendMessage('chatId', 'Text');
api.setKeyboard(true, true).sendMessage('chatId', 'Text');
//or
Api.setKeyboard(true, true);
Api.sendMessage('chatId', 'Text');
api.setKeyboard(true, true);
api.sendMessage('chatId', 'Text');
```

@@ -270,3 +270,3 @@

Api.sendPhoto('chatId', inputFile);
api.sendPhoto('chatId', inputFile);
```

@@ -281,3 +281,3 @@

Api.sendPhoto('chatId', inputFile);
api.sendPhoto('chatId', inputFile);
```

@@ -284,0 +284,0 @@

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