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

grammy

Package Overview
Dependencies
Maintainers
3
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grammy - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

7

out/bot.d.ts

@@ -154,4 +154,4 @@ import { Composer } from './composer';

* If you're writing a library on top of grammY, check out the
* [documentation](https://grammy.dev/advanced/runner.html) to learn about
* how grammY receives updates.
* [documentation](https://grammy.dev/plugins/runner.html) of the runner
* plugin for an example that uses this method.
*

@@ -190,3 +190,4 @@ * @param update An update from the Telegram Bot API

* you worry about how much load your bot can handle, check out the grammY
* [documentation](https://grammy.dev/advanced/scaling.md) about scaling up.
* [documentation](https://grammy.dev/advanced/scaling.html) about scaling
* up.
*

@@ -193,0 +194,0 @@ * @param options Options to use for simple long polling

@@ -113,4 +113,4 @@ "use strict";

* If you're writing a library on top of grammY, check out the
* [documentation](https://grammy.dev/advanced/runner.html) to learn about
* how grammY receives updates.
* [documentation](https://grammy.dev/plugins/runner.html) of the runner
* plugin for an example that uses this method.
*

@@ -169,3 +169,4 @@ * @param update An update from the Telegram Bot API

* you worry about how much load your bot can handle, check out the grammY
* [documentation](https://grammy.dev/advanced/scaling.md) about scaling up.
* [documentation](https://grammy.dev/advanced/scaling.html) about scaling
* up.
*

@@ -172,0 +173,0 @@ * @param options Options to use for simple long polling

@@ -68,3 +68,3 @@ import { Context } from './context';

* more advanced things about middleware, check out the
* [documentation](https://grammy.dev/advanced/middleware.html) on the website.
* [documentation](https://grammy.dev/guide/middleware.html) on the website.
*/

@@ -71,0 +71,0 @@ export declare type Middleware<C extends Context = Context> = MiddlewareFn<C> | MiddlewareObj<C>;

@@ -42,5 +42,5 @@ import { AbortSignal } from 'abort-controller';

* Read up about middleware on the
* [website](https://grammy.dev/advanced/middleware.html) if you want to know
* more about the powerful opportunities that lie in context objects, and about
* how grammY implements them.
* [website](https://grammy.dev/guide/context.html) if you want to know more
* about the powerful opportunities that lie in context objects, and about how
* grammY implements them.
*/

@@ -142,3 +142,3 @@ export declare class Context implements RenamedUpdate {

/**
* Context-aware alias for `forwardMessage`. Use this method to forward messages of any kind. On success, the sent Message is returned.
* Context-aware alias for `forwardMessage`. Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.
*

@@ -153,3 +153,3 @@ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)

/**
* Context-aware alias for `copyMessage`. Use this method to copy messages of any kind. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
* Context-aware alias for `copyMessage`. Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
*

@@ -656,3 +656,5 @@ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)

} & {
animation: import("@grammyjs/types/message").Value;
animation: import("@grammyjs/types/message").Value; /**
* The update object that is contained in the context.
*/
}) | (Update.Edited & Message.CaptionableMessage & {

@@ -731,3 +733,2 @@ audio: import("@grammyjs/types/message").Value;

* @param provider_token Payments provider token, obtained via Botfather
* @param start_parameter Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter
* @param currency Three-letter ISO 4217 currency code, see more on currencies

@@ -740,3 +741,3 @@ * @param prices Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)

*/
replyWithInvoice(title: string, description: string, payload: string, provider_token: string, start_parameter: string, currency: string, prices: readonly LabeledPrice[], other?: Other<'sendInvoice', 'title' | 'description' | 'payload' | 'provider_token' | 'start_parameter' | 'currency' | 'prices'>, signal?: AbortSignal): Promise<Message.InvoiceMessage>;
replyWithInvoice(title: string, description: string, payload: string, provider_token: string, currency: string, prices: readonly LabeledPrice[], other?: Other<'sendInvoice', 'title' | 'description' | 'payload' | 'provider_token' | 'start_parameter' | 'currency' | 'prices'>, signal?: AbortSignal): Promise<Message.InvoiceMessage>;
/**

@@ -743,0 +744,0 @@ * Context-aware alias for `answerShippingQuery`. If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.

@@ -37,5 +37,5 @@ "use strict";

* Read up about middleware on the
* [website](https://grammy.dev/advanced/middleware.html) if you want to know
* more about the powerful opportunities that lie in context objects, and about
* how grammY implements them.
* [website](https://grammy.dev/guide/context.html) if you want to know more
* about the powerful opportunities that lie in context objects, and about how
* grammY implements them.
*/

@@ -172,3 +172,3 @@ class Context {

/**
* Context-aware alias for `forwardMessage`. Use this method to forward messages of any kind. On success, the sent Message is returned.
* Context-aware alias for `forwardMessage`. Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.
*

@@ -185,3 +185,3 @@ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)

/**
* Context-aware alias for `copyMessage`. Use this method to copy messages of any kind. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
* Context-aware alias for `copyMessage`. Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
*

@@ -881,3 +881,2 @@ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)

* @param provider_token Payments provider token, obtained via Botfather
* @param start_parameter Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter
* @param currency Three-letter ISO 4217 currency code, see more on currencies

@@ -890,4 +889,4 @@ * @param prices Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)

*/
replyWithInvoice(title, description, payload, provider_token, start_parameter, currency, prices, other, signal) {
return this.api.sendInvoice(orThrow(this.chat, 'sendInvoice').id, title, description, payload, provider_token, start_parameter, currency, prices, other, signal);
replyWithInvoice(title, description, payload, provider_token, currency, prices, other, signal) {
return this.api.sendInvoice(orThrow(this.chat, 'sendInvoice').id, title, description, payload, provider_token, currency, prices, other, signal);
}

@@ -894,0 +893,0 @@ /**

@@ -215,7 +215,2 @@ import { KeyboardButton, InlineKeyboardButton, LoginUrl } from '../platform';

pay(text: string): this;
/**
* Return the resulting inline keyboard that was built. May be called in the
* end if necessary so you can specify more options in `reply_markup`.
*/
build(): InlineKeyboardButton[][];
}

@@ -263,10 +263,3 @@ "use strict";

}
/**
* Return the resulting inline keyboard that was built. May be called in the
* end if necessary so you can specify more options in `reply_markup`.
*/
build() {
return this.inline_keyboard;
}
}
exports.InlineKeyboard = InlineKeyboard;

@@ -13,3 +13,3 @@ import { Context } from '../context';

* on session middleware to know more, and read the section about sessions on
* the [website](https://grammy.dev/guide/sessions.html).
* the [website](https://grammy.dev/plugins/session.html).
*/

@@ -33,4 +33,4 @@ export interface SessionFlavor<S> {

/**
* A lazy session flavor is a context flavor holds a promise of some session
* data under `ctx.session`.
* A lazy session flavor is a context flavor that holds a promise of some
* session data under `ctx.session`.
*

@@ -43,3 +43,4 @@ * Lazy session middleware will provide this promise lazily on the context

* on lazy session middleware to know more, and read the section about lazy
* sessions on the [website](https://grammy.dev/advanced/lazy-sessions.html).
* sessions on the
* [website](https://grammy.dev/plugins/session.html#lazy-sessions).
*/

@@ -101,4 +102,5 @@ export interface LazySessionFlavor<S> {

* your chats and users. Check out the
* [documentation](https://grammy.dev/guide/sessions.html) on the website
* about session middleware to know how session keys are used.
* [documentation](https://grammy.dev/plugins/session.html#how-to-use-sessions)
* on the website about how to use session middleware to know how session
* keys are used.
*

@@ -160,3 +162,3 @@ * The default implementation will store sessions per chat, as determined by

*
* Check out the [documentation](https://grammy.dev/guide/sessions.html) on the
* Check out the [documentation](https://grammy.dev/plugins/session.html) on the
* website to know more about how sessions work in grammY.

@@ -193,4 +195,5 @@ *

*
* Check out the [documentation](https://grammy.dev/advanced/lazy-sessions.html)
* on the website to know more about how lazy sessions work in grammY.
* Check out the
* [documentation](https://grammy.dev/plugins/session.html#lazy-sessions) on the
* website to know more about how lazy sessions work in grammY.
*

@@ -197,0 +200,0 @@ * @param options Optional configuration to pass to the session middleware

@@ -45,3 +45,3 @@ "use strict";

*
* Check out the [documentation](https://grammy.dev/guide/sessions.html) on the
* Check out the [documentation](https://grammy.dev/plugins/session.html) on the
* website to know more about how sessions work in grammY.

@@ -108,4 +108,5 @@ *

*
* Check out the [documentation](https://grammy.dev/advanced/lazy-sessions.html)
* on the website to know more about how lazy sessions work in grammY.
* Check out the
* [documentation](https://grammy.dev/plugins/session.html#lazy-sessions) on the
* website to know more about how lazy sessions work in grammY.
*

@@ -112,0 +113,0 @@ * @param options Optional configuration to pass to the session middleware

@@ -13,5 +13,4 @@ import i from "../mod.js"

export const InlineKeyboard = i.InlineKeyboard
export const Router = i.Router
export const session = i.session
export const lazySession = i.lazySession
export const webhookCallback = i.webhookCallback

@@ -31,5 +31,5 @@ import { AliasProps, Context } from './context';

readonly text: {};
readonly animation: {};
readonly audio: {};
readonly document: {};
readonly animation: {};
readonly photo: {};

@@ -44,4 +44,4 @@ readonly sticker: {};

readonly poll: {};
readonly venue: {};
readonly location: {};
readonly venue: {};
readonly new_chat_members: {

@@ -61,2 +61,3 @@ readonly me: {};

readonly channel_chat_created: {};
readonly message_auto_delete_timer_changed: {};
readonly migrate_to_chat_id: {};

@@ -70,2 +71,6 @@ readonly migrate_from_chat_id: {};

readonly proximity_alert_triggered: {};
readonly voice_chat_scheduled: {};
readonly voice_chat_started: {};
readonly voice_chat_ended: {};
readonly voice_chat_participants_invited: {};
readonly entities: {

@@ -104,5 +109,5 @@ readonly mention: {};

readonly text: {};
readonly animation: {};
readonly audio: {};
readonly document: {};
readonly animation: {};
readonly photo: {};

@@ -117,4 +122,4 @@ readonly sticker: {};

readonly poll: {};
readonly venue: {};
readonly location: {};
readonly venue: {};
readonly new_chat_members: {

@@ -134,2 +139,3 @@ readonly me: {};

readonly channel_chat_created: {};
readonly message_auto_delete_timer_changed: {};
readonly migrate_to_chat_id: {};

@@ -143,2 +149,6 @@ readonly migrate_from_chat_id: {};

readonly proximity_alert_triggered: {};
readonly voice_chat_scheduled: {};
readonly voice_chat_started: {};
readonly voice_chat_ended: {};
readonly voice_chat_participants_invited: {};
readonly entities: {

@@ -177,5 +187,5 @@ readonly mention: {};

readonly text: {};
readonly animation: {};
readonly audio: {};
readonly document: {};
readonly animation: {};
readonly photo: {};

@@ -190,4 +200,4 @@ readonly sticker: {};

readonly poll: {};
readonly venue: {};
readonly location: {};
readonly venue: {};
readonly new_chat_members: {

@@ -207,2 +217,3 @@ readonly me: {};

readonly channel_chat_created: {};
readonly message_auto_delete_timer_changed: {};
readonly migrate_to_chat_id: {};

@@ -216,2 +227,6 @@ readonly migrate_from_chat_id: {};

readonly proximity_alert_triggered: {};
readonly voice_chat_scheduled: {};
readonly voice_chat_started: {};
readonly voice_chat_ended: {};
readonly voice_chat_participants_invited: {};
readonly entities: {

@@ -250,5 +265,5 @@ readonly mention: {};

readonly text: {};
readonly animation: {};
readonly audio: {};
readonly document: {};
readonly animation: {};
readonly photo: {};

@@ -263,4 +278,4 @@ readonly sticker: {};

readonly poll: {};
readonly venue: {};
readonly location: {};
readonly venue: {};
readonly new_chat_members: {

@@ -280,2 +295,3 @@ readonly me: {};

readonly channel_chat_created: {};
readonly message_auto_delete_timer_changed: {};
readonly migrate_to_chat_id: {};

@@ -289,2 +305,6 @@ readonly migrate_from_chat_id: {};

readonly proximity_alert_triggered: {};
readonly voice_chat_scheduled: {};
readonly voice_chat_started: {};
readonly voice_chat_ended: {};
readonly voice_chat_participants_invited: {};
readonly entities: {

@@ -291,0 +311,0 @@ readonly mention: {};

@@ -139,5 +139,5 @@ "use strict";

text: {},
animation: {},
audio: {},
document: {},
animation: {},
photo: {},

@@ -152,4 +152,4 @@ sticker: {},

poll: {},
venue: {},
location: {},
venue: {},
new_chat_members: USER_KEYS,

@@ -163,2 +163,3 @@ left_chat_member: USER_KEYS,

channel_chat_created: {},
message_auto_delete_timer_changed: {},
migrate_to_chat_id: {},

@@ -172,2 +173,6 @@ migrate_from_chat_id: {},

proximity_alert_triggered: {},
voice_chat_scheduled: {},
voice_chat_started: {},
voice_chat_ended: {},
voice_chat_participants_invited: {},
entities: ENTITY_KEYS,

@@ -174,0 +179,0 @@ caption_entities: ENTITY_KEYS,

@@ -6,3 +6,2 @@ export { BotError, Bot } from './bot';

export * from './convenience/keyboard';
export * from './convenience/router';
export * from './convenience/session';

@@ -9,0 +8,0 @@ export * from './convenience/webhook';

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

__exportStar(require("./convenience/keyboard"), exports);
__exportStar(require("./convenience/router"), exports);
__exportStar(require("./convenience/session"), exports);

@@ -27,0 +26,0 @@ __exportStar(require("./convenience/webhook"), exports);

{
"name": "grammy",
"description": "grammY core package ported to Node.js",
"version": "0.5.0",
"version": "0.6.0",
"author": "KnorpelSenf",

@@ -19,3 +19,3 @@ "license": "MIT",

"dependencies": {
"@grammyjs/types": "^2.0.2",
"@grammyjs/types": "^2.1.0",
"abort-controller": "^3.0.0",

@@ -22,0 +22,0 @@ "debug": "^4.3.1",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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