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

gramio

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gramio - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

2

dist/bot.d.ts

@@ -85,2 +85,4 @@ import type { Context, ContextType, MaybeArray, UpdateName } from "@gramio/contexts";

}) => unknown, options?: Omit<SetMyCommandsParams, "commands"> & Omit<TelegramBotCommand, "command">): this;
/** Currently not isolated!!! */
group(grouped: (bot: typeof this) => Bot<any, any>): Bot<any, any>;
start({ webhook, dropPendingUpdates, allowedUpdates, }?: {

@@ -87,0 +89,0 @@ webhook?: Omit<APIMethodParams<"setWebhook">, "drop_pending_updates" | "allowed_updates">;

@@ -271,2 +271,12 @@ "use strict";

}
for (const value of plugin.preRequests) {
const [preRequest, updateName] = value;
if (!updateName)
this.preRequest(preRequest);
else
this.preRequest(updateName, preRequest);
}
for (const handler of plugin.groups) {
this.group(handler);
}
this.dependencies.push(plugin.name);

@@ -314,2 +324,6 @@ return this;

}
/** Currently not isolated!!! */
group(grouped) {
return grouped(this);
}
async start({ webhook, dropPendingUpdates, allowedUpdates, } = {}) {

@@ -316,0 +330,0 @@ await Promise.all(this.lazyloadPlugins.map(async (plugin) => this.extend(await plugin)));

import type { BotLike, Context, ContextType, MaybeArray, UpdateName } from "@gramio/contexts";
import type { APIMethods } from "@gramio/types";
import type { DeriveDefinitions, ErrorDefinitions, Hooks } from "./types";
import type { Bot } from "./bot";
export declare class Plugin<Errors extends ErrorDefinitions = {}, Derives extends DeriveDefinitions = DeriveDefinitions> {

@@ -12,2 +13,3 @@ Errors: Errors;

][];
groups: ((bot: Bot<any, any>) => Bot<any, any>)[];
name: string;

@@ -22,2 +24,4 @@ errorsDefinitions: Record<string, {

});
/** Currently not isolated!!! */
group(grouped: (bot: Bot<Errors, Derives>) => Bot<any, any>): this;
/**

@@ -24,0 +28,0 @@ * Register custom class-error in plugin

@@ -64,2 +64,3 @@ "use strict";

preRequests = [];
groups = [];
name;

@@ -73,2 +74,7 @@ errorsDefinitions = {};

}
/** Currently not isolated!!! */
group(grouped) {
this.groups.push(grouped);
return this;
}
/**

@@ -75,0 +81,0 @@ * Register custom class-error in plugin

2

package.json
{
"name": "gramio",
"version": "0.0.21",
"version": "0.0.22",
"description": "Powerful Telegram Bot API framework",

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

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