New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pwrtelegram

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pwrtelegram - npm Package Compare versions

Comparing version

to
0.0.2

.travis.yml

13

package.json
{
"name": "pwrtelegram",
"version": "0.0.1",
"version": "0.0.2",
"main": "lib/index.js",
"description": "A Node.js Library for the PWRTelegram User API, which is the equivalent to Telegram's Client API",
"main": "index.js",
"scripts": {
"gen-doc": "jsdoc2md --files index.js --template api.hbs > README.md"
"gen-doc": "jsdoc2md --files lib/index.js > doc/api.md",
"test": "istanbul cover ./node_modules/mocha/bin/_mocha"
},

@@ -31,6 +32,10 @@ "keywords": [

"pino": "^4.0.3",
"querystring": "^0.2.0",
"request": "^2.81.0",
"request-promise": "^4.1.1"
},
"devDependencies": {
"istanbul": "^0.4.5",
"mocha": "^3.2.0",
"should": "^11.2.1"
}
}
[![https://telegram.me/kamikazechaser](https://img.shields.io/badge/%F0%9F%92%AC_Telegram-kamikazechaser-blue.svg?style=flat-square)](https://telegram.me/kamikazechaser)
[![https://telegram.me/Bestulo](https://img.shields.io/badge/%F0%9F%92%AC_Telegram-Besatnias-blue.svg?style=flat-square)](https://telegram.me/Bestulo)
[![Travis](https://img.shields.io/travis/kamikazechaser/pwrtelegram.svg?style=flat-square)](https://travis-ci.org/kamikazechaser/pwrtelegram)
[![Codecov](https://img.shields.io/codecov/c/github/kamikazechaser/pwrtelegram.svg?style=flat-square)](https://codecov.io/gh/kamikazechaser/pwrtelegram)
>PWRTelegram User API
A Node.js Library for the PWRTelegram User API, which is the equivalent to Telegram's Client API
A Node.js Library for the PWRTelegram User API
> Powered by [PWRTelegram API](http://pwrtelegram.xyz/)
## About
This library allows you to invoke Telegram's core API methods, using PWRTelegram API as a mediator. This allows one to build user bots.
**Important Information**
- Based on [MadelineProto](https://daniil.it/MadelineProto/API_docs/) layer 62
- It is HIGHLY recommended to run [your own instance](https://github.com/pwrtelegram/pwrtelegram-backend) of PWRTelegram for speed
- The global instance is [under heavy load](https://t.me/daniilgentili/125), so requests may take upto 15 seconds
- This library is promised based
- This library returns actual server errors for debugging purposes
## Install

@@ -17,68 +32,14 @@

<a name="User"></a>
- [Library](https://github.com/kamikazechaser/pwrtelegram/blob/master/doc/api.md)
- [Telegram Core API](https://core.telegram.org/methods)
- [Madeline Proto](https://daniil.it/MadelineProto/API_docs/methods/)
## User
User
## Issues And Contribution
**Kind**: global class
Fork the repository and submit a pull request for whatever change you want to be added to this project. If you have any questions, just open an issue.
* [User](#User)
* [new User(token, baseUrl)](#new_User_new)
* [.sendMessage(chatId, text)](#User+sendMessage) ⇒ <code>Promise</code>
* [.setTyping(chatId, action)](#User+setTyping) ⇒ <code>Promise</code>
* [.forwardMessage(chatId, messageId)](#User+forwardMessage) ⇒ <code>Promise</code>
Before submitting a pull request, see the contribution [guidelines](https://github.com/kamikazechaser/pwrtelegram/blob/master/CONTRIBUTING.md).
<a name="new_User_new"></a>
## License
### new User(token, baseUrl)
| Param | Type | Description |
| --- | --- | --- |
| token | <code>String</code> | Bot Token |
| baseUrl | <code>String</code> | (Optional) Custom pwetelegram API instance URL |
<a name="User+sendMessage"></a>
### user.sendMessage(chatId, text) ⇒ <code>Promise</code>
Send text message.
**Kind**: instance method of <code>[User](#User)</code>
**Returns**: <code>Promise</code> - Updates
**See**: https://core.telegram.org/method/messages.sendMessage
| Param | Type | Description |
| --- | --- | --- |
| chatId | <code>Number</code> &#124; <code>String</code> | Unique identifier for the message recipient |
| text | <code>String</code> | Text of the message to be sent |
<a name="User+setTyping"></a>
### user.setTyping(chatId, action) ⇒ <code>Promise</code>
Set typing.
**Kind**: instance method of <code>[User](#User)</code>
**Returns**: <code>Promise</code> - Boolean
**See**: https://core.telegram.org/method/messages.setTyping
| Param | Type | Description |
| --- | --- | --- |
| chatId | <code>Number</code> &#124; <code>String</code> | Unique identifier for the message recipient |
| action | <code>String</code> | Type of action to be sent |
<a name="User+forwardMessage"></a>
### user.forwardMessage(chatId, messageId) ⇒ <code>Promise</code>
Forward text message.
**Kind**: instance method of <code>[User](#User)</code>
**See**: https://core.telegram.org/method/messages.forwardMessage
| Param | Type | Description |
| --- | --- | --- |
| chatId | <code>Number</code> &#124; <code>String</code> | Unique identifier for the message recipient |
| messageId | <code>Number</code> &#124; <code>String</code> | Unique identifier of the message to be forwarded |
## Issues And Contribution
Fork the repository and submit a pull request for whatever change you want to be added to this project. If you have any questions, just open an issue.
Released under AGPL-3.0

Sorry, the diff of this file is not supported yet