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

puregram

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puregram - npm Package Compare versions

Comparing version 1.1.9-rc.8 to 2.0.0-fix

lib/api-methods.d.ts

33

package.json
{
"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)
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