grammy 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/out/composer.d.ts +2 -2
- package/out/context.d.ts +4 -3
- package/out/filter.d.ts +4 -0
- package/out/filter.js +1 -0
- package/out/web.mjs +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<!-- deno-fmt-ignore-start -->
|
|
12
12
|
|
|
13
|
-
[](https://core.telegram.org/bots/api)
|
|
14
14
|
[](https://deno.land/x/grammy)
|
|
15
15
|
[](https://www.npmjs.org/package/grammy)
|
|
16
16
|
[](#contributors-)
|
package/out/composer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CallbackQueryContext, type ChatTypeContext, type ChosenInlineResultContext, type CommandContext, Context, type GameQueryContext, type HearsContext, type InlineQueryContext, type MaybeArray, type PreCheckoutQueryContext, type ReactionContext, type ShippingQueryContext, type
|
|
1
|
+
import { type CallbackQueryContext, type ChatTypeContext, type ChosenInlineResultContext, type CommandContext, Context, type GameQueryContext, type HearsContext, type InlineQueryContext, type MaybeArray, type PreCheckoutQueryContext, type ReactionContext, type ShippingQueryContext, type StringWithCommandSuggestions } from "./context.js";
|
|
2
2
|
import { type Filter, type FilterQuery } from "./filter.js";
|
|
3
3
|
import { type Chat, type ReactionType, type ReactionTypeEmoji } from "./types.js";
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -267,7 +267,7 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
|
|
|
267
267
|
* @param command The command to look for
|
|
268
268
|
* @param middleware The middleware to register
|
|
269
269
|
*/
|
|
270
|
-
command
|
|
270
|
+
command(command: MaybeArray<StringWithCommandSuggestions>, ...middleware: Array<CommandMiddleware<C>>): Composer<CommandContext<C>>;
|
|
271
271
|
/**
|
|
272
272
|
* Registers some middleware that will only be added when a new reaction of
|
|
273
273
|
* the given type is added to a message.
|
package/out/context.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import { type Methods, type RawApi } from "./core/client.js";
|
|
|
3
3
|
import { type Filter, type FilterCore, type FilterQuery } from "./filter.js";
|
|
4
4
|
import { type Chat, type ChatPermissions, type InlineQueryResult, type InputFile, type InputMedia, type InputMediaAudio, type InputMediaDocument, type InputMediaPhoto, type InputMediaVideo, type InputPaidMedia, type InputPollOption, type LabeledPrice, type Message, type MessageEntity, type PassportElementError, type ReactionType, type ReactionTypeEmoji, type Update, type User, type UserFromGetMe } from "./types.js";
|
|
5
5
|
export type MaybeArray<T> = T | T[];
|
|
6
|
-
|
|
6
|
+
/** permits `string` but gives hints */
|
|
7
|
+
export type StringWithCommandSuggestions = (string & Record<never, never>) | "start" | "help" | "settings" | "privacy";
|
|
7
8
|
type Other<M extends Methods<RawApi>, X extends string = never> = OtherApi<RawApi, M, X>;
|
|
8
9
|
type SnakeToCamelCase<S extends string> = S extends `${infer L}_${infer R}` ? `${L}${Capitalize<SnakeToCamelCase<R>>}` : S;
|
|
9
10
|
type AliasProps<U> = {
|
|
@@ -32,7 +33,7 @@ interface StaticHas {
|
|
|
32
33
|
*
|
|
33
34
|
* @param command The command to match
|
|
34
35
|
*/
|
|
35
|
-
command
|
|
36
|
+
command(command: MaybeArray<StringWithCommandSuggestions>): <C extends Context>(ctx: C) => ctx is CommandContext<C>;
|
|
36
37
|
/**
|
|
37
38
|
* Generates a predicate function that can test context objects for
|
|
38
39
|
* containing a message reaction update. This uses the same logic as
|
|
@@ -383,7 +384,7 @@ export declare class Context implements RenamedUpdate {
|
|
|
383
384
|
*
|
|
384
385
|
* @param command The command to match
|
|
385
386
|
*/
|
|
386
|
-
hasCommand
|
|
387
|
+
hasCommand(command: MaybeArray<StringWithCommandSuggestions>): this is CommandContextCore;
|
|
387
388
|
hasReaction(reaction: MaybeArray<ReactionTypeEmoji["emoji"] | ReactionType>): this is ReactionContextCore;
|
|
388
389
|
/**
|
|
389
390
|
* Returns `true` if this context object belongs to a chat with the given
|
package/out/filter.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ declare const UPDATE_KEYS: {
|
|
|
47
47
|
readonly migrate_to_chat_id: {};
|
|
48
48
|
readonly migrate_from_chat_id: {};
|
|
49
49
|
readonly successful_payment: {};
|
|
50
|
+
readonly refunded_payment: {};
|
|
50
51
|
readonly boost_added: {};
|
|
51
52
|
readonly users_shared: {};
|
|
52
53
|
readonly chat_shared: {};
|
|
@@ -170,6 +171,7 @@ declare const UPDATE_KEYS: {
|
|
|
170
171
|
readonly migrate_to_chat_id: {};
|
|
171
172
|
readonly migrate_from_chat_id: {};
|
|
172
173
|
readonly successful_payment: {};
|
|
174
|
+
readonly refunded_payment: {};
|
|
173
175
|
readonly boost_added: {};
|
|
174
176
|
readonly users_shared: {};
|
|
175
177
|
readonly chat_shared: {};
|
|
@@ -479,6 +481,7 @@ declare const UPDATE_KEYS: {
|
|
|
479
481
|
readonly migrate_to_chat_id: {};
|
|
480
482
|
readonly migrate_from_chat_id: {};
|
|
481
483
|
readonly successful_payment: {};
|
|
484
|
+
readonly refunded_payment: {};
|
|
482
485
|
readonly boost_added: {};
|
|
483
486
|
readonly users_shared: {};
|
|
484
487
|
readonly chat_shared: {};
|
|
@@ -602,6 +605,7 @@ declare const UPDATE_KEYS: {
|
|
|
602
605
|
readonly migrate_to_chat_id: {};
|
|
603
606
|
readonly migrate_from_chat_id: {};
|
|
604
607
|
readonly successful_payment: {};
|
|
608
|
+
readonly refunded_payment: {};
|
|
605
609
|
readonly boost_added: {};
|
|
606
610
|
readonly users_shared: {};
|
|
607
611
|
readonly chat_shared: {};
|
package/out/filter.js
CHANGED
package/out/web.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grammy",
|
|
3
3
|
"description": "The Telegram Bot Framework.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.27.0",
|
|
5
5
|
"author": "KnorpelSenf",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"backport": "deno2node tsconfig.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@grammyjs/types": "3.
|
|
20
|
+
"@grammyjs/types": "3.11.0",
|
|
21
21
|
"abort-controller": "^3.0.0",
|
|
22
22
|
"debug": "^4.3.4",
|
|
23
23
|
"node-fetch": "^2.7.0"
|