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

@yuva1422/telegram.js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yuva1422/telegram.js - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "@yuva1422/telegram.js",
"version": "1.0.2",
"version": "1.0.3",
"description": "A powerful Node.js module that allows you to easily interact with the Telegram Bot API",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -71,4 +71,4 @@ <div align="center">

[documentation](https://telegram.js.org/#/docs).
See [the contribution guide](https://github.com/yuvapoojary/telegram.js/blob/master/.github/CONTRIBUTING.md) if you'd like to submit a PR.
## Help

@@ -75,0 +75,0 @@

@@ -13,3 +13,2 @@ 'use strict';

this.offset = client.options.pollingOffset || null;
this.interval = client.options.interval || 1000;
this.pollTimeout = null;

@@ -62,3 +61,3 @@ }

this.poll();
}, this.interval);
}, this.options.pollInterval);
});

@@ -65,0 +64,0 @@ }

@@ -20,2 +20,9 @@ 'use strict';

/**
* Create http server
* @param {string} path Path for the webhook
* @param {number} port Port to listen on
* @param {string} host The host to run on
* @param {Object} tlsOptions Https options
*/
createServer(path, port, host, tlsOptions) {

@@ -53,2 +60,5 @@ this.path = path;

/**
* Closes the http server
*/
close() {

@@ -55,0 +65,0 @@ if (this.server) this.server.close();

@@ -20,3 +20,3 @@ 'use strict';

* @returns {WorkerClient}
* @see {https://core.telegram.org/bots/api#update|Telegram Bot API}
* @see {@link https://core.telegram.org/bots/api#update|Telegram Bot API}
*/

@@ -23,0 +23,0 @@ processUpdate(data) {

@@ -62,3 +62,3 @@ 'use strict';

* @param {string|Object} idOrInstance The id or instance of something in this Manager
* @returns {?Snowflake}
* @returns {number|string}
*/

@@ -65,0 +65,0 @@ resolveID(idOrInstance) {

@@ -19,3 +19,3 @@ 'use strict';

* The cache of this manager
* @type {Collection<ChatManager>}
* @type {Collection<Chat>}
* @name ChatManager#cache

@@ -22,0 +22,0 @@ */

@@ -36,3 +36,3 @@ 'use strict';

* Get registered commands in telegram
* @returns {Promise<Array<Command>>}
* @returns {Promise<Array<Object>>}
*/

@@ -45,3 +45,3 @@ getCommands() {

* Set commands in telegram
* @param {Array<Object>} commands
* @param {Array<Object>} commands Override existing commands
* @returns {Promise<boolean>}

@@ -48,0 +48,0 @@ */

@@ -6,20 +6,17 @@ 'use strict';

* @typedef {Object} ClientOptions
* @property {string} [apiURL=https://ap
* .telegram.org] Base url of the telegram
* api
* @property {number} [messageCacheMaxSiz
* =200] Maximum number of messages to
* @property {string} [apiURL=https://api.telegram.org] Base url of the telegram
* API
* @property {number} [pollInterval=1000] Interval for the polling in ms
* @property {number} [messageCacheMaxSize=200] Maximum number of messages to
* cache per chat (-1 or Infinity for
* unlimited)
* @property {number} [chatCacheMaxSiz
* =Infinity] Maximum number of chats to
* @property {number} [chatCacheMaxSize=Infinity] Maximum number of chats to
* cache
* @property {number} [memberCacheMaxSize
* =200] Maximum number of members to
* @property {number} [memberCacheMaxSize=200] Maximum number of members to
* cache per chat
* @property {number} [userCacheMaxSiz
* =1000] Maximum number of users to cache
* @property {number} [userCacheMaxSize=1000] Maximum number of users to cache
*/
const ClientOptions = {
apiURL: 'https://api.telegram.org',
pollInterval: 1000,
messageCacheMaxSize: 200,

@@ -26,0 +23,0 @@ chatCacheMaxSize: Infinity,

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