Comparing version 1.1.9-rc.8 to 2.0.0-fix
{ | ||
"name": "puregram", | ||
"version": "1.1.9-rc.8", | ||
"main": "src/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/nitreojs/puregram.git" | ||
}, | ||
"version": "2.0.0-fix", | ||
"description": "Powerful Node.js package written on TypeScript that allows you to work with Telegram API", | ||
"main": "lib/index", | ||
"author": "nitrojs", | ||
"license": "MIT", | ||
"dependencies": { | ||
"abort-controller": "^3.0.0", | ||
"debug": "^4.1.1", | ||
"form-data": "^3.0.0", | ||
"middleware-io": "^2.1.0", | ||
"inspectable": "^1.0.0", | ||
"middleware-io": "^2.5.0", | ||
"node-fetch": "^2.6.0" | ||
}, | ||
"description": "", | ||
"bugs": { | ||
"url": "https://github.com/nitreojs/puregram/issues" | ||
}, | ||
"homepage": "https://github.com/nitreojs/puregram#readme", | ||
"keywords": [ | ||
"telegram", | ||
"api", | ||
"telegram-api" | ||
"sdk", | ||
"node", | ||
"js", | ||
"bot" | ||
], | ||
"typings": "./typings", | ||
"files": [ | ||
"src", | ||
"typings" | ||
] | ||
"lib" | ||
], | ||
"devDependencies": { | ||
"@types/debug": "^4.1.5", | ||
"@types/node-fetch": "^2.5.7" | ||
} | ||
} |
# puregram | ||
Puregram is a powerful Node.js package that allows you to work with Telegram API 🚀 | ||
`puregram` is a powerful Node.js package that allows you to easily interact with [Telegram API](https://core.telegram.org/bots/api) 🚀 | ||
| [Examples](https://github.com/nitreojs/puregram/tree/master/docs/examples) | | ||
| -------------------------------------------------------------------------- | | ||
## Features | ||
* 100% Telegram API coverage | ||
* Works with JavaScript and TypeScript | ||
* Typings | ||
## Installation | ||
> **[Node.js](https://nodejs.org/) 8.0.0 or newer is required** | ||
> **[Node.js](https://nodejs.org/) 12.0.0 or newer is required** | ||
@@ -19,41 +28,20 @@ ### Yarn | ||
## Example usage | ||
```js | ||
let { Telegram } = require('puregram'); | ||
let telegram = new Telegram({ | ||
```ts | ||
import { Telegram, MessageContext } from 'puregram'; | ||
const telegram: Telegram = new Telegram({ | ||
token: process.env.TOKEN | ||
}); | ||
telegram.updates.on('message', context => context.send('Hi!')); | ||
telegram.updates.on('message', (context: MessageContext) => { | ||
context.send('Hi!'); | ||
}); | ||
telegram.updates.startPolling().then( | ||
() => console.log(`Started polling ${telegram.bot.data}!`) | ||
); | ||
telegram.updates.startPolling().catch(console.error); | ||
``` | ||
## Community | ||
### Packages that may be useful to you | ||
* [@puregram/session](https://github.com/nitreojs/puregram/tree/master/packages/session): Simple implementation of the sessions | ||
* [@puregram/scenes](https://github.com/nitreojs/puregram/tree/master/packages/scenes): Simple implementation of middleware-based scene management | ||
> If you want to add your module in the list, create a [new issue](https://github.com/nitreojs/puregram/issues/new) in the repository. | ||
### Bots that were made using puregram | ||
* [QiwiBot](https://t.me/qiwionebot) - helps to work with [QIWI](https://qiwi.com) wallet | ||
* [Magnit X](https://t.me/magnitxbot) - saves your money on payments in [Magnit](https://magnit.ru) shop | ||
* [Telegram Anonym Chat](https://t.me/RuAnon_bot) - anonymous chat with other people in Telegram | ||
* [Get My ID](https://t.me/receive_my_id_bot) - bot from [example (get-id-bot.js)](https://github.com/nitreojs/puregram/blob/master/docs/examples/get-id-bot.js) | ||
* [Brawl Stars](https://t.me/BrawlStarsInlineBot) - bot to get user's or club's statistics in Brawl Stars | ||
* [Message Payload Bot](https://t.me/MessagePayloadBot) - bot to get all message's payload | ||
If you want to see your bot here — PM [me](https://t.me/nitrojs) _(I will add up to 10 bots here)_ | ||
## Thanks to | ||
Biggest thanks to [Negezor](https://github.com/negezor) for his [vk-io](https://github.com/negezor/vk-io) library that helped me with this package! | ||
### Chats | ||
[VK chat](https://vk.me/join/AJQ1d7n35xXnfBxIB21zACP3) | ||
[Telegram chat](https://t.me/puregram_chat) | ||
### [Telegram chat](https://t.me/puregram_chat) |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
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
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
340
725455
6
2
19361
1
2
47
2
+ Addedabort-controller@^3.0.0
+ Addedinspectable@^1.0.0
+ Addedabort-controller@3.0.0(transitive)
+ Addedevent-target-shim@5.0.1(transitive)
+ Addedinspectable@1.2.2(transitive)
Updatedmiddleware-io@^2.5.0