Comparing version 1.0.0 to 1.0.1
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19250