@mtcute/dispatcher 0.18.0-rc.5 → 0.18.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.
Files changed (42) hide show
  1. package/callback-data-builder.d.cts +49 -0
  2. package/callback-data-builder.test.d.cts +1 -0
  3. package/context/base.d.cts +9 -0
  4. package/context/business-message.d.cts +60 -0
  5. package/context/callback-query.d.cts +62 -0
  6. package/context/chat-join-request.d.cts +17 -0
  7. package/context/chosen-inline-result.d.cts +22 -0
  8. package/context/index.d.cts +9 -0
  9. package/context/inline-query.d.cts +15 -0
  10. package/context/message.d.cts +82 -0
  11. package/context/parse.d.cts +13 -0
  12. package/context/pre-checkout-query.d.cts +17 -0
  13. package/context/scene-transition.d.cts +24 -0
  14. package/dispatcher.d.cts +880 -0
  15. package/filters/bots.d.cts +62 -0
  16. package/filters/bots.test.d.cts +1 -0
  17. package/filters/bundle.d.cts +10 -0
  18. package/filters/chat.d.cts +29 -0
  19. package/filters/group.d.cts +26 -0
  20. package/filters/index.d.cts +4 -0
  21. package/filters/logic.d.cts +29 -0
  22. package/filters/logic.test.d.cts +1 -0
  23. package/filters/message.d.cts +223 -0
  24. package/filters/state.d.cts +15 -0
  25. package/filters/text.d.cts +64 -0
  26. package/filters/types.d.cts +91 -0
  27. package/filters/updates.d.cts +39 -0
  28. package/filters/user.d.cts +24 -0
  29. package/handler.d.cts +41 -0
  30. package/index.d.cts +8 -0
  31. package/package.json +9 -9
  32. package/propagation.d.cts +22 -0
  33. package/state/index.d.cts +5 -0
  34. package/state/key.d.cts +24 -0
  35. package/state/provider.d.cts +5 -0
  36. package/state/providers/index.d.cts +2 -0
  37. package/state/providers/memory.d.cts +29 -0
  38. package/state/providers/sqlite.d.cts +28 -0
  39. package/state/repository.d.cts +62 -0
  40. package/state/service.d.cts +20 -0
  41. package/state/update-state.d.cts +151 -0
  42. package/wizard.d.cts +64 -0
@@ -0,0 +1,49 @@
1
+ import { BusinessCallbackQuery, CallbackQuery, InlineCallbackQuery, MaybeArray, MaybePromise } from '@mtcute/core';
2
+ import { UpdateFilter } from './filters/types.js';
3
+ /**
4
+ * Callback data builder, inspired by [aiogram](https://github.com/aiogram/aiogram).
5
+ *
6
+ * This can be used to simplify management of different callbacks.
7
+ *
8
+ * [Learn more in the docs](/guide/topics/keyboards.html#callback-data-builders)
9
+ */
10
+ export declare class CallbackDataBuilder<T extends string> {
11
+ prefix: string;
12
+ private readonly _fields;
13
+ sep: string;
14
+ /**
15
+ * @param prefix Prefix for the data. Use something unique across your bot.
16
+ * @param fields Field names in the order they will be serialized.
17
+ */
18
+ constructor(prefix: string, ...fields: T[]);
19
+ /**
20
+ * Build a callback data string
21
+ *
22
+ * @param obj Object containing the data
23
+ */
24
+ build(obj: Record<T, string>): string;
25
+ /**
26
+ * Parse callback data to object
27
+ *
28
+ * @param data Callback data as string
29
+ * @param safe If `true`, will return `null` instead of throwing on invalid data
30
+ */
31
+ parse(data: string, safe?: false): Record<T, string>;
32
+ parse(data: string, safe: true): Record<T, string> | null;
33
+ /**
34
+ * Create a filter for this callback data.
35
+ *
36
+ * You can either pass an object with field names as keys and values as strings or regexes,
37
+ * which will be compiled to a RegExp, or a function that will be called with the parsed data.
38
+ * Note that the strings will be passed to `RegExp` **directly**, so you may want to escape them.
39
+ *
40
+ * When using a function, you can either return a boolean, or an object with field names as keys
41
+ * and values as strings or regexes. In the latter case, the resulting object will be matched
42
+ * against the parsed data the same way as if you passed it directly.
43
+ *
44
+ * @param params
45
+ */
46
+ filter<Update extends CallbackQuery | InlineCallbackQuery | BusinessCallbackQuery>(params?: ((upd: Update, parsed: Record<T, string>) => MaybePromise<Partial<Record<T, MaybeArray<string | RegExp>>> | boolean>) | Partial<Record<T, MaybeArray<string | RegExp>>>): UpdateFilter<Update, {
47
+ match: Record<T, string>;
48
+ }>;
49
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ParsedUpdate } from '@mtcute/core';
2
+ import { TelegramClient } from '@mtcute/core/client.js';
3
+ export type UpdateContext<T> = T & {
4
+ client: TelegramClient;
5
+ _name: Extract<ParsedUpdate, {
6
+ data: T;
7
+ }>['name'];
8
+ };
9
+ export type UpdateContextDistributed<T> = T extends never ? never : UpdateContext<T>;
@@ -0,0 +1,60 @@
1
+ import { Message, OmitInputMessageId, ParametersSkip1, Sticker, BusinessMessage } from '@mtcute/core';
2
+ import { TelegramClient } from '@mtcute/core/client.js';
3
+ import { DeleteMessagesParams, ForwardMessageOptions, SendCopyGroupParams, SendCopyParams } from '@mtcute/core/methods.js';
4
+ import { UpdateContext } from './base.js';
5
+ /**
6
+ * Context of a business message related update.
7
+ *
8
+ * This is a subclass of {@link BusinessMessage}, so all fields
9
+ * of the message are available.
10
+ *
11
+ * For message groups, own fields are related to the last message
12
+ * in the group. To access all messages, use {@link BusinessMessageContext#messages}.
13
+ */
14
+ export declare class BusinessMessageContext extends BusinessMessage implements UpdateContext<BusinessMessage> {
15
+ readonly client: TelegramClient;
16
+ readonly _name: "new_business_message";
17
+ /**
18
+ * List of messages in the message group.
19
+ *
20
+ * For other updates, this is a list with a single element (`this`).
21
+ */
22
+ readonly messages: BusinessMessageContext[];
23
+ /** Whether this update is about a message group */
24
+ readonly isMessageGroup: boolean;
25
+ constructor(client: TelegramClient, message: BusinessMessage | BusinessMessage[]);
26
+ /** Get all custom emojis contained in this message (message group), if any */
27
+ getCustomEmojis(): Promise<Sticker[]>;
28
+ /** Send a text message to the same chat (and topic, if applicable) as a given message */
29
+ answerText(...params: ParametersSkip1<TelegramClient['answerText']>): Promise<Message>;
30
+ /** Send a media to the same chat (and topic, if applicable) as a given message */
31
+ answerMedia(...params: ParametersSkip1<TelegramClient['answerMedia']>): Promise<Message>;
32
+ /** Send a media group to the same chat (and topic, if applicable) as a given message */
33
+ answerMediaGroup(...params: ParametersSkip1<TelegramClient['answerMediaGroup']>): Promise<Message[]>;
34
+ /** Send a text message in reply to this message */
35
+ replyText(...params: ParametersSkip1<TelegramClient['replyText']>): Promise<Message>;
36
+ /** Send a media in reply to this message */
37
+ replyMedia(...params: ParametersSkip1<TelegramClient['replyMedia']>): Promise<Message>;
38
+ /** Send a media group in reply to this message */
39
+ replyMediaGroup(...params: ParametersSkip1<TelegramClient['replyMediaGroup']>): Promise<Message[]>;
40
+ /** Send a text message in reply to this message */
41
+ quoteWithText(params: Parameters<TelegramClient['quoteWithText']>[1]): Promise<Message>;
42
+ /** Send a media in reply to this message */
43
+ quoteWithMedia(params: Parameters<TelegramClient['quoteWithMedia']>[1]): Promise<Message>;
44
+ /** Send a media group in reply to this message */
45
+ quoteWithMediaGroup(params: Parameters<TelegramClient['quoteWithMediaGroup']>[1]): Promise<Message[]>;
46
+ /** Delete this message (message group) */
47
+ delete(params?: DeleteMessagesParams): Promise<void>;
48
+ /** Pin this message */
49
+ pin(params?: OmitInputMessageId<Parameters<TelegramClient['pinMessage']>[0]>): Promise<Message | null>;
50
+ /** Unpin this message */
51
+ unpin(): Promise<void>;
52
+ /** Edit this message */
53
+ edit(params: OmitInputMessageId<Parameters<TelegramClient['editMessage']>[0]>): Promise<Message>;
54
+ /** Forward this message (message group) */
55
+ forwardTo(params: ForwardMessageOptions): Promise<Message[]>;
56
+ /** Send a copy of this message (message group) */
57
+ copy(params: SendCopyParams & SendCopyGroupParams): Promise<Message | Message[]>;
58
+ /** React to this message */
59
+ react(params: OmitInputMessageId<Parameters<TelegramClient['sendReaction']>[0]>): Promise<Message | null>;
60
+ }
@@ -0,0 +1,62 @@
1
+ import { MaybePromise, Message, BusinessCallbackQuery, CallbackQuery, InlineCallbackQuery } from '@mtcute/core';
2
+ import { TelegramClient } from '@mtcute/core/client.js';
3
+ import { UpdateContext } from './base.js';
4
+ /**
5
+ * Context of a callback query update.
6
+ *
7
+ * This is a subclass of {@link CallbackQuery}, so all its fields are also available.
8
+ */
9
+ export declare class CallbackQueryContext extends CallbackQuery implements UpdateContext<CallbackQuery> {
10
+ readonly client: TelegramClient;
11
+ readonly _name: "callback_query";
12
+ constructor(client: TelegramClient, query: CallbackQuery);
13
+ /** Answer to this callback query */
14
+ answer(params: Parameters<TelegramClient['answerCallbackQuery']>[1]): Promise<void>;
15
+ /**
16
+ * Get the message containing the callback button being clicked.
17
+ *
18
+ * Note that the message may have been deleted, in which case
19
+ * `null` will be returned.
20
+ */
21
+ getMessage(): Promise<Message | null>;
22
+ /**
23
+ * Edit the message that contained the callback button that was clicked.
24
+ */
25
+ editMessage(params: Omit<Parameters<TelegramClient['editInlineMessage']>[0], 'messageId'>): Promise<Message>;
26
+ /**
27
+ * Shortcut for getting the message and editing it.
28
+ */
29
+ editMessageWith(handler: (msg: Message) => MaybePromise<Parameters<CallbackQueryContext['editMessage']>[0]>): Promise<Message | undefined>;
30
+ }
31
+ /**
32
+ * Context of an inline-originated callback query update.
33
+ *
34
+ * This is a subclass of {@link InlineCallbackQuery}, so all its fields are also available.
35
+ */
36
+ export declare class InlineCallbackQueryContext extends InlineCallbackQuery implements UpdateContext<InlineCallbackQuery> {
37
+ readonly client: TelegramClient;
38
+ readonly _name: "inline_callback_query";
39
+ constructor(client: TelegramClient, query: InlineCallbackQuery);
40
+ /** Answer to this callback query */
41
+ answer(params: Parameters<TelegramClient['answerCallbackQuery']>[1]): Promise<void>;
42
+ /**
43
+ * Edit the message that contained the callback button that was clicked.
44
+ */
45
+ editMessage(params: Omit<Parameters<TelegramClient['editInlineMessage']>[0], 'messageId'>): Promise<void>;
46
+ }
47
+ /**
48
+ * Context of an callback query update originated from a business connection message
49
+ *
50
+ * This is a subclass of {@link BusinessCallbackQuery}, so all its fields are also available.
51
+ */
52
+ export declare class BusinessCallbackQueryContext extends BusinessCallbackQuery implements UpdateContext<BusinessCallbackQuery> {
53
+ readonly client: TelegramClient;
54
+ readonly _name: "business_callback_query";
55
+ constructor(client: TelegramClient, query: BusinessCallbackQuery);
56
+ /** Answer to this callback query */
57
+ answer(params: Parameters<TelegramClient['answerCallbackQuery']>[1]): Promise<void>;
58
+ /**
59
+ * Edit the message that contained the callback button that was clicked.
60
+ */
61
+ editMessage(params: Omit<Parameters<TelegramClient['editInlineMessage']>[0], 'messageId'>): Promise<Message>;
62
+ }
@@ -0,0 +1,17 @@
1
+ import { TelegramClient } from '@mtcute/core/client.js';
2
+ import { UpdateContext } from './base.js';
3
+ import { BotChatJoinRequestUpdate } from '@mtcute/core';
4
+ /**
5
+ * Context of a chat join request update (for bots).
6
+ *
7
+ * This is a subclass of {@link BotChatJoinRequestUpdate}, so all its fields are also available.
8
+ */
9
+ export declare class ChatJoinRequestUpdateContext extends BotChatJoinRequestUpdate implements UpdateContext<BotChatJoinRequestUpdate> {
10
+ readonly client: TelegramClient;
11
+ readonly _name: "bot_chat_join_request";
12
+ constructor(client: TelegramClient, update: BotChatJoinRequestUpdate);
13
+ /** Approve the request */
14
+ approve(): Promise<void>;
15
+ /** Decline the request */
16
+ decline(): Promise<void>;
17
+ }
@@ -0,0 +1,22 @@
1
+ import { TelegramClient } from '@mtcute/core/client.js';
2
+ import { UpdateContext } from './base.js';
3
+ import { ChosenInlineResult } from '@mtcute/core';
4
+ /**
5
+ * Context of a chosen inline result update.
6
+ *
7
+ * This is a subclass of {@link ChosenInlineResult}, so all its fields are also available.
8
+ *
9
+ * > **Note**: To receive these updates, you must enable
10
+ * > Inline feedback in [@BotFather](//t.me/botfather)
11
+ */
12
+ export declare class ChosenInlineResultContext extends ChosenInlineResult implements UpdateContext<ChosenInlineResult> {
13
+ readonly client: TelegramClient;
14
+ readonly _name: "chosen_inline_result";
15
+ constructor(client: TelegramClient, result: ChosenInlineResult);
16
+ /**
17
+ * Edit the message that was sent when this inline result that was chosen.
18
+ *
19
+ * > **Note**: This method can only be used if the message contained a reply markup
20
+ */
21
+ editMessage(params: Parameters<TelegramClient['editInlineMessage']>[0]): Promise<void>;
22
+ }
@@ -0,0 +1,9 @@
1
+ export * from './base.js';
2
+ export * from './business-message.js';
3
+ export * from './callback-query.js';
4
+ export * from './chat-join-request.js';
5
+ export * from './chosen-inline-result.js';
6
+ export * from './inline-query.js';
7
+ export * from './message.js';
8
+ export type { UpdateContextType } from './parse.js';
9
+ export * from './pre-checkout-query.js';
@@ -0,0 +1,15 @@
1
+ import { ParametersSkip1, InlineQuery } from '@mtcute/core';
2
+ import { TelegramClient } from '@mtcute/core/client.js';
3
+ import { UpdateContext } from './base.js';
4
+ /**
5
+ * Context of an inline query update.
6
+ *
7
+ * This is a subclass of {@link InlineQuery}, so all its fields are also available.
8
+ */
9
+ export declare class InlineQueryContext extends InlineQuery implements UpdateContext<InlineQuery> {
10
+ readonly client: TelegramClient;
11
+ readonly _name: "inline_query";
12
+ constructor(client: TelegramClient, query: InlineQuery);
13
+ /** Answer to this inline query */
14
+ answer(...params: ParametersSkip1<TelegramClient['answerInlineQuery']>): Promise<void>;
15
+ }
@@ -0,0 +1,82 @@
1
+ import { OmitInputMessageId, ParametersSkip1, Peer, Sticker, Message } from '@mtcute/core';
2
+ import { TelegramClient } from '@mtcute/core/client.js';
3
+ import { DeleteMessagesParams, ForwardMessageOptions, SendCopyGroupParams, SendCopyParams } from '@mtcute/core/methods.js';
4
+ import { UpdateContext } from './base.js';
5
+ /**
6
+ * Context of a message-related update.
7
+ *
8
+ * This is a subclass of {@link Message}, so all fields
9
+ * of the message are available.
10
+ *
11
+ * For message groups, own fields are related to the last message
12
+ * in the group. To access all messages, use {@link MessageContext#messages}.
13
+ */
14
+ export declare class MessageContext extends Message implements UpdateContext<Message> {
15
+ readonly client: TelegramClient;
16
+ readonly _name: "new_message";
17
+ /**
18
+ * List of messages in the message group.
19
+ *
20
+ * For other updates, this is a list with a single element (`this`).
21
+ */
22
+ readonly messages: MessageContext[];
23
+ /** Whether this update is about a message group */
24
+ readonly isMessageGroup: boolean;
25
+ constructor(client: TelegramClient, message: Message | Message[]);
26
+ /**
27
+ * Get complete information about {@link sender}
28
+ *
29
+ * Learn more: [Incomplete peers](https://mtcute.dev/guide/topics/peers.html#incomplete-peers)
30
+ */
31
+ getCompleteSender(): Promise<Peer>;
32
+ /**
33
+ * Get complete information about {@link chat}
34
+ *
35
+ * Learn more: [Incomplete peers](https://mtcute.dev/guide/topics/peers.html#incomplete-peers)
36
+ */
37
+ getCompleteChat(): Promise<Peer>;
38
+ /** Get a message that this message is a reply to */
39
+ getReplyTo(): Promise<Message | null>;
40
+ /** If this is a channel post, get its automatic forward in the discussion group */
41
+ getDiscussionMessage(): Promise<Message | null>;
42
+ /** Get all custom emojis contained in this message (message group), if any */
43
+ getCustomEmojis(): Promise<Sticker[]>;
44
+ /** Send a text message to the same chat (and topic, if applicable) as a given message */
45
+ answerText(...params: ParametersSkip1<TelegramClient['answerText']>): Promise<Message>;
46
+ /** Send a media to the same chat (and topic, if applicable) as a given message */
47
+ answerMedia(...params: ParametersSkip1<TelegramClient['answerMedia']>): Promise<Message>;
48
+ /** Send a media group to the same chat (and topic, if applicable) as a given message */
49
+ answerMediaGroup(...params: ParametersSkip1<TelegramClient['answerMediaGroup']>): Promise<Message[]>;
50
+ /** Send a text message in reply to this message */
51
+ replyText(...params: ParametersSkip1<TelegramClient['replyText']>): Promise<Message>;
52
+ /** Send a media in reply to this message */
53
+ replyMedia(...params: ParametersSkip1<TelegramClient['replyMedia']>): Promise<Message>;
54
+ /** Send a media group in reply to this message */
55
+ replyMediaGroup(...params: ParametersSkip1<TelegramClient['replyMediaGroup']>): Promise<Message[]>;
56
+ /** Send a text message in reply to this message */
57
+ quoteWithText(params: Parameters<TelegramClient['quoteWithText']>[1]): Promise<Message>;
58
+ /** Send a media in reply to this message */
59
+ quoteWithMedia(params: Parameters<TelegramClient['quoteWithMedia']>[1]): Promise<Message>;
60
+ /** Send a media group in reply to this message */
61
+ quoteWithMediaGroup(params: Parameters<TelegramClient['quoteWithMediaGroup']>[1]): Promise<Message[]>;
62
+ /** Send a text as a comment to this message */
63
+ commentText(...params: ParametersSkip1<TelegramClient['commentText']>): Promise<Message>;
64
+ /** Send a media as a comment to this message */
65
+ commentMedia(...params: ParametersSkip1<TelegramClient['commentMedia']>): Promise<Message>;
66
+ /** Send a media group as a comment to this message */
67
+ commentMediaGroup(...params: ParametersSkip1<TelegramClient['commentMediaGroup']>): Promise<Message[]>;
68
+ /** Delete this message (message group) */
69
+ delete(params?: DeleteMessagesParams): Promise<void>;
70
+ /** Pin this message */
71
+ pin(params?: OmitInputMessageId<Parameters<TelegramClient['pinMessage']>[0]>): Promise<Message | null>;
72
+ /** Unpin this message */
73
+ unpin(): Promise<void>;
74
+ /** Edit this message */
75
+ edit(params: OmitInputMessageId<Parameters<TelegramClient['editMessage']>[0]>): Promise<Message>;
76
+ /** Forward this message (message group) */
77
+ forwardTo(params: ForwardMessageOptions): Promise<Message[]>;
78
+ /** Send a copy of this message (message group) */
79
+ copy(params: SendCopyParams & SendCopyGroupParams): Promise<Message> | Promise<Message[]>;
80
+ /** React to this message */
81
+ react(params: OmitInputMessageId<Parameters<TelegramClient['sendReaction']>[0]>): Promise<Message | null>;
82
+ }
@@ -0,0 +1,13 @@
1
+ import { BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessConnection, ChatJoinRequestUpdate, ChatMemberUpdate, DeleteBusinessMessageUpdate, DeleteMessageUpdate, DeleteStoryUpdate, HistoryReadUpdate, ParsedUpdate, PollUpdate, PollVoteUpdate, StoryUpdate, UserStatusUpdate, UserTypingUpdate } from '@mtcute/core';
2
+ import { TelegramClient } from '@mtcute/core/client.js';
3
+ import { UpdateContextDistributed } from './base.js';
4
+ import { BusinessMessageContext } from './business-message.js';
5
+ import { BusinessCallbackQueryContext, CallbackQueryContext, InlineCallbackQueryContext } from './callback-query.js';
6
+ import { ChatJoinRequestUpdateContext } from './chat-join-request.js';
7
+ import { ChosenInlineResultContext } from './chosen-inline-result.js';
8
+ import { InlineQueryContext } from './inline-query.js';
9
+ import { MessageContext } from './message.js';
10
+ import { PreCheckoutQueryContext } from './pre-checkout-query.js';
11
+ export type UpdateContextType = MessageContext | InlineQueryContext | ChosenInlineResultContext | CallbackQueryContext | InlineCallbackQueryContext | BusinessCallbackQueryContext | ChatJoinRequestUpdateContext | PreCheckoutQueryContext | BusinessMessageContext | UpdateContextDistributed<DeleteMessageUpdate | ChatMemberUpdate | PollUpdate | PollVoteUpdate | UserStatusUpdate | UserTypingUpdate | HistoryReadUpdate | BotStoppedUpdate | ChatJoinRequestUpdate | StoryUpdate | DeleteStoryUpdate | BotReactionUpdate | BotReactionCountUpdate | BusinessConnection | DeleteBusinessMessageUpdate>;
12
+ /** @internal */
13
+ export declare function _parsedUpdateToContext(client: TelegramClient, update: ParsedUpdate): UpdateContextType;
@@ -0,0 +1,17 @@
1
+ import { TelegramClient } from '@mtcute/core/client.js';
2
+ import { UpdateContext } from './base.js';
3
+ import { PreCheckoutQuery } from '@mtcute/core';
4
+ /**
5
+ * Context of a pre-checkout query update
6
+ *
7
+ * This is a subclass of {@link PreCheckoutQuery}, so all its fields are also available.
8
+ */
9
+ export declare class PreCheckoutQueryContext extends PreCheckoutQuery implements UpdateContext<PreCheckoutQuery> {
10
+ readonly client: TelegramClient;
11
+ readonly _name: "pre_checkout_query";
12
+ constructor(client: TelegramClient, query: PreCheckoutQuery);
13
+ /** Approve the query */
14
+ approve(): Promise<void>;
15
+ /** Decline the query, optionally with an error */
16
+ decline(error?: string): Promise<void>;
17
+ }
@@ -0,0 +1,24 @@
1
+ import { UpdateContextType } from './parse.js';
2
+ import { BusinessMessageContext } from './business-message.js';
3
+ import { CallbackQueryContext, InlineCallbackQueryContext } from './callback-query.js';
4
+ import { MessageContext } from './message.js';
5
+ /** Update which is dispatched whenever scene is entered or exited */
6
+ export declare class SceneTransitionContext {
7
+ /** Name of the previous scene, if any */
8
+ readonly previousScene: string | null;
9
+ /** Update, handler for which triggered the transition */
10
+ readonly update: UpdateContextType;
11
+ constructor(
12
+ /** Name of the previous scene, if any */
13
+ previousScene: string | null,
14
+ /** Update, handler for which triggered the transition */
15
+ update: UpdateContextType);
16
+ /** Get {@link update}, asserting it is a message-related update */
17
+ get message(): MessageContext;
18
+ /** Get {@link update}, asserting it is a business message-related update */
19
+ get businessMessage(): BusinessMessageContext;
20
+ /** Get {@link update}, asserting it is a callback query update */
21
+ get callbackQuery(): CallbackQueryContext;
22
+ /** Get {@link update}, asserting it is an inline callback query update */
23
+ get inlineCallbackQuery(): InlineCallbackQueryContext;
24
+ }