grammy 1.21.2 → 1.22.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 CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  <!-- deno-fmt-ignore-start -->
12
12
 
13
- [![Bot API](https://img.shields.io/badge/Bot%20API-7.1-blue?logo=telegram&style=flat&labelColor=000&color=3b82f6)](https://core.telegram.org/bots/api)
13
+ [![Bot API](https://img.shields.io/badge/Bot%20API-7.2-blue?logo=telegram&style=flat&labelColor=000&color=3b82f6)](https://core.telegram.org/bots/api)
14
14
  [![Deno](https://shield.deno.dev/x/grammy)](https://deno.land/x/grammy)
15
15
  [![npm](https://img.shields.io/npm/v/grammy?logo=npm&style=flat&labelColor=000&color=3b82f6)](https://www.npmjs.org/package/grammy)
16
16
  [![All Contributors](https://img.shields.io/github/all-contributors/grammyjs/grammy?style=flat&labelColor=000&color=3b82f6)](#contributors-)
package/out/context.d.ts CHANGED
@@ -6,7 +6,7 @@ export type MaybeArray<T> = T | T[];
6
6
  export type StringWithSuggestions<S extends string> = (string & Record<never, never>) | S;
7
7
  type Other<M extends Methods<RawApi>, X extends string = never> = OtherApi<RawApi, M, X>;
8
8
  type SnakeToCamelCase<S extends string> = S extends `${infer L}_${infer R}` ? `${L}${Capitalize<SnakeToCamelCase<R>>}` : S;
9
- export type AliasProps<U> = {
9
+ type AliasProps<U> = {
10
10
  [K in string & keyof U as SnakeToCamelCase<K>]: U[K];
11
11
  };
12
12
  type RenamedUpdate = AliasProps<Omit<Update, "update_id">>;
@@ -161,6 +161,14 @@ export declare class Context implements RenamedUpdate {
161
161
  get channelPost(): (Message & Update.Channel) | undefined;
162
162
  /** Alias for `ctx.update.edited_channel_post` */
163
163
  get editedChannelPost(): (Message & Update.Edited & Update.Channel) | undefined;
164
+ /** Alias for `ctx.update.business_connection` */
165
+ get businessConnection(): import("@grammyjs/types/manage.js").BusinessConnection | undefined;
166
+ /** Alias for `ctx.update.business_message` */
167
+ get businessMessage(): (Message & Update.Private) | undefined;
168
+ /** Alias for `ctx.update.edited_business_message` */
169
+ get editedBusinessMessage(): (Message & Update.Edited & Update.Private) | undefined;
170
+ /** Alias for `ctx.update.deleted_business_messages` */
171
+ get deletedBusinessMessages(): import("@grammyjs/types/manage.js").BusinessMessagesDeleted | undefined;
164
172
  /** Alias for `ctx.update.message_reaction` */
165
173
  get messageReaction(): import("@grammyjs/types/message.js").MessageReactionUpdated | undefined;
166
174
  /** Alias for `ctx.update.message_reaction_count` */
@@ -190,35 +198,50 @@ export declare class Context implements RenamedUpdate {
190
198
  /** Alias for `ctx.update.removed_chat_boost` */
191
199
  get removedChatBoost(): import("@grammyjs/types/manage.js").ChatBoostRemoved | undefined;
192
200
  /**
193
- * Get message object from wherever possible. Alias for `ctx.message ??
194
- * ctx.editedMessage ?? ctx.callbackQuery?.message ?? ctx.channelPost ??
195
- * ctx.editedChannelPost`
201
+ * Get the message object from wherever possible. Alias for `this.message ??
202
+ * this.editedMessage ?? this.channelPost ?? this.editedChannelPost ??
203
+ * this.businessMessage ?? this.editedBusinessMessage ??
204
+ * this.callbackQuery?.message`.
196
205
  */
197
206
  get msg(): Message | undefined;
198
207
  /**
199
- * Get chat object from wherever possible. Alias for `(ctx.msg ??
200
- * ctx.myChatMember ?? ctx.chatMember ?? ctx.chatJoinRequest ??
201
- * ctx.messageReaction ?? ctx.messageReactionCount ?? ctx.chatBoost ??
202
- * ctx.removedChatBoost)?.chat`
208
+ * Get the chat object from wherever possible. Alias for `(this.msg ??
209
+ * this.deletedBusinessMessages ?? this.messageReaction ??
210
+ * this.messageReactionCount ?? this.myChatMember ?? this.chatMember ??
211
+ * this.chatJoinRequest ?? this.chatBoost ?? this.removedChatBoost)?.chat`.
203
212
  */
204
213
  get chat(): Chat | undefined;
205
214
  /**
206
- * Get sender chat object from wherever possible. Alias for
215
+ * Get the sender chat object from wherever possible. Alias for
207
216
  * `ctx.msg?.sender_chat`.
208
217
  */
209
218
  get senderChat(): Chat | undefined;
210
219
  /**
211
- * Get message author from wherever possible. Alias for
212
- * `(ctx.callbackQuery?? ctx.inlineQuery ?? ctx.shippingQuery ??
213
- * ctx.preCheckoutQuery ?? ctx.chosenInlineResult ?? ctx.msg ??
214
- * ctx.myChatMember ?? ctx.chatMember ?? ctx.chatJoinRequest)?.from`
220
+ * Get the user object from wherever possible. Alias for
221
+ * `(this.businessConnection ?? this.messageReaction ??
222
+ * (this.chatBoost?.boost ?? this.removedChatBoost)?.source)?.user ??
223
+ * (this.msg ?? this.inlineQuery ?? this.chosenInlineResult ??
224
+ * this.callbackQuery ?? this.shippingQuery ?? this.preCheckoutQuery ??
225
+ * this.myChatMember ?? this.chatMember ?? this.chatJoinRequest)?.from`.
215
226
  */
216
227
  get from(): User | undefined;
217
228
  /**
218
- * Get inline message ID from wherever possible. Alias for
219
- * `(ctx.callbackQuery ?? ctx.chosenInlineResult)?.inline_message_id`
229
+ * Get the message identifier from wherever possible. Alias for
230
+ * `this.msg?.message_id ?? this.messageReaction?.message_id ??
231
+ * this.messageReactionCount?.message_id`.
232
+ */
233
+ get msgId(): number | undefined;
234
+ /**
235
+ * Get the inline message identifier from wherever possible. Alias for
236
+ * `(ctx.callbackQuery ?? ctx.chosenInlineResult)?.inline_message_id`.
220
237
  */
221
238
  get inlineMessageId(): string | undefined;
239
+ /**
240
+ * Get the business connection identifier from wherever possible. Alias for
241
+ * `this.msg?.business_connection_id ?? this.businessConnection?.id ??
242
+ * this.deletedBusinessMessages?.business_connection_id`.
243
+ */
244
+ get businessConnectionId(): string | undefined;
222
245
  /**
223
246
  * Get entities and their text. Extracts the text from `ctx.msg.text` or `ctx.msg.caption`.
224
247
  * Returns an empty array if one of `ctx.msg`, `ctx.msg.text`
@@ -403,7 +426,7 @@ export declare class Context implements RenamedUpdate {
403
426
  * Context-aware alias for `api.forwardMessages`. Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.
404
427
  *
405
428
  * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
406
- * @param message_ids Identifiers of 1-100 messages in the current chat to forward. The identifiers must be specified in a strictly increasing order.
429
+ * @param message_ids A list of 1-100 identifiers of messages in the current chat to forward. The identifiers must be specified in a strictly increasing order.
407
430
  * @param other Optional remaining parameters, confer the official reference below
408
431
  * @param signal Optional `AbortSignal` to cancel the request
409
432
  *
@@ -424,7 +447,7 @@ export declare class Context implements RenamedUpdate {
424
447
  * Context-aware alias for `api.copyMessages`.Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.
425
448
  *
426
449
  * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
427
- * @param message_ids Identifiers of 1-100 messages in the current chat to copy. The identifiers must be specified in a strictly increasing order.
450
+ * @param message_ids A list of 1-100 identifiers of messages in the current chat to copy. The identifiers must be specified in a strictly increasing order.
428
451
  * @param other Optional remaining parameters, confer the official reference below
429
452
  * @param signal Optional `AbortSignal` to cancel the request
430
453
  *
@@ -594,16 +617,6 @@ export declare class Context implements RenamedUpdate {
594
617
  * **Official reference:** https://core.telegram.org/bots/api#senddice
595
618
  */
596
619
  replyWithDice(emoji: string, other?: Other<"sendDice", "chat_id" | "emoji">, signal?: AbortSignal): Promise<Message.DiceMessage>;
597
- /**
598
- * Context-aware alias for `api.setMessageReaction`. Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.
599
- *
600
- * @param reaction New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
601
- * @param other Optional remaining parameters, confer the official reference below
602
- * @param signal Optional `AbortSignal` to cancel the request
603
- *
604
- * **Official reference:** https://core.telegram.org/bots/api#senddice
605
- */
606
- react(reaction: MaybeArray<ReactionTypeEmoji["emoji"] | ReactionType>, other?: Other<"setMessageReaction", "chat_id" | "message_id" | "reaction">, signal?: AbortSignal): Promise<true>;
607
620
  /**
608
621
  * Context-aware alias for `api.sendChatAction`. Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
609
622
  *
@@ -618,6 +631,16 @@ export declare class Context implements RenamedUpdate {
618
631
  * **Official reference:** https://core.telegram.org/bots/api#sendchataction
619
632
  */
620
633
  replyWithChatAction(action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note", other?: Other<"sendChatAction", "chat_id" | "action">, signal?: AbortSignal): Promise<true>;
634
+ /**
635
+ * Context-aware alias for `api.setMessageReaction`. Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.
636
+ *
637
+ * @param reaction A list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
638
+ * @param other Optional remaining parameters, confer the official reference below
639
+ * @param signal Optional `AbortSignal` to cancel the request
640
+ *
641
+ * **Official reference:** https://core.telegram.org/bots/api#setmessagereaction
642
+ */
643
+ react(reaction: MaybeArray<ReactionTypeEmoji["emoji"] | ReactionType>, other?: Other<"setMessageReaction", "chat_id" | "message_id" | "reaction">, signal?: AbortSignal): Promise<true>;
621
644
  /**
622
645
  * Context-aware alias for `api.getUserProfilePhotos`. Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
623
646
  *
@@ -637,6 +660,13 @@ export declare class Context implements RenamedUpdate {
637
660
  * **Official reference:** https://core.telegram.org/bots/api#getuserchatboosts
638
661
  */
639
662
  getUserChatBoosts(chat_id: number | string, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").UserChatBoosts>;
663
+ /**
664
+ * Context-aware alias for `api.getBusinessConnection`. Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.
665
+ * @param signal Optional `AbortSignal` to cancel the request
666
+ *
667
+ * **Official reference:** https://core.telegram.org/bots/api#getbusinessconnection
668
+ */
669
+ getBusinessConnection(signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").BusinessConnection>;
640
670
  /**
641
671
  * Context-aware alias for `api.getFile`. Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
642
672
  *
@@ -1166,7 +1196,7 @@ export declare class Context implements RenamedUpdate {
1166
1196
  * Context-aware alias for `api.deleteMessages`. Use this method to delete multiple messages simultaneously. Returns True on success.
1167
1197
  *
1168
1198
  * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1169
- * @param message_ids Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted
1199
+ * @param message_ids A list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted
1170
1200
  * @param signal Optional `AbortSignal` to cancel the request
1171
1201
  *
1172
1202
  * **Official reference:** https://core.telegram.org/bots/api#deletemessages
@@ -1175,7 +1205,7 @@ export declare class Context implements RenamedUpdate {
1175
1205
  /**
1176
1206
  * Context-aware alias for `api.sendSticker`. Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.
1177
1207
  *
1178
- * @param sticker Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data.
1208
+ * @param sticker Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. Video and animated stickers can't be sent via an HTTP URL.
1179
1209
  * @param other Optional remaining parameters, confer the official reference below
1180
1210
  * @param signal Optional `AbortSignal` to cancel the request
1181
1211
  *
@@ -1185,7 +1215,7 @@ export declare class Context implements RenamedUpdate {
1185
1215
  /**
1186
1216
  * Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
1187
1217
  *
1188
- * @param custom_emoji_ids List of custom emoji identifiers
1218
+ * @param custom_emoji_ids A list of custom emoji identifiers
1189
1219
  * @param signal Optional `AbortSignal` to cancel the request
1190
1220
  *
1191
1221
  * **Official reference:** https://core.telegram.org/bots/api#getcustomemojistickers
package/out/context.js CHANGED
@@ -226,6 +226,22 @@ class Context {
226
226
  get editedChannelPost() {
227
227
  return this.update.edited_channel_post;
228
228
  }
229
+ /** Alias for `ctx.update.business_connection` */
230
+ get businessConnection() {
231
+ return this.update.business_connection;
232
+ }
233
+ /** Alias for `ctx.update.business_message` */
234
+ get businessMessage() {
235
+ return this.update.business_message;
236
+ }
237
+ /** Alias for `ctx.update.edited_business_message` */
238
+ get editedBusinessMessage() {
239
+ return this.update.edited_business_message;
240
+ }
241
+ /** Alias for `ctx.update.deleted_business_messages` */
242
+ get deletedBusinessMessages() {
243
+ return this.update.deleted_business_messages;
244
+ }
229
245
  /** Alias for `ctx.update.message_reaction` */
230
246
  get messageReaction() {
231
247
  return this.update.message_reaction;
@@ -284,53 +300,76 @@ class Context {
284
300
  }
285
301
  // AGGREGATION SHORTCUTS
286
302
  /**
287
- * Get message object from wherever possible. Alias for `ctx.message ??
288
- * ctx.editedMessage ?? ctx.callbackQuery?.message ?? ctx.channelPost ??
289
- * ctx.editedChannelPost`
303
+ * Get the message object from wherever possible. Alias for `this.message ??
304
+ * this.editedMessage ?? this.channelPost ?? this.editedChannelPost ??
305
+ * this.businessMessage ?? this.editedBusinessMessage ??
306
+ * this.callbackQuery?.message`.
290
307
  */
291
308
  get msg() {
292
- var _a, _b, _c, _d, _e;
309
+ var _a, _b, _c, _d, _e, _f, _g;
293
310
  // Keep in sync with types in `filter.ts`.
294
- return ((_e = (_d = (_b = (_a = this.message) !== null && _a !== void 0 ? _a : this.editedMessage) !== null && _b !== void 0 ? _b : (_c = this.callbackQuery) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : this.channelPost) !== null && _e !== void 0 ? _e : this.editedChannelPost);
311
+ return ((_f = (_e = (_d = (_c = (_b = (_a = this.message) !== null && _a !== void 0 ? _a : this.editedMessage) !== null && _b !== void 0 ? _b : this.channelPost) !== null && _c !== void 0 ? _c : this.editedChannelPost) !== null && _d !== void 0 ? _d : this.businessMessage) !== null && _e !== void 0 ? _e : this.editedBusinessMessage) !== null && _f !== void 0 ? _f : (_g = this.callbackQuery) === null || _g === void 0 ? void 0 : _g.message);
295
312
  }
296
313
  /**
297
- * Get chat object from wherever possible. Alias for `(ctx.msg ??
298
- * ctx.myChatMember ?? ctx.chatMember ?? ctx.chatJoinRequest ??
299
- * ctx.messageReaction ?? ctx.messageReactionCount ?? ctx.chatBoost ??
300
- * ctx.removedChatBoost)?.chat`
314
+ * Get the chat object from wherever possible. Alias for `(this.msg ??
315
+ * this.deletedBusinessMessages ?? this.messageReaction ??
316
+ * this.messageReactionCount ?? this.myChatMember ?? this.chatMember ??
317
+ * this.chatJoinRequest ?? this.chatBoost ?? this.removedChatBoost)?.chat`.
301
318
  */
302
319
  get chat() {
303
- var _a, _b, _c, _d, _e, _f, _g, _h;
320
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
304
321
  // Keep in sync with types in `filter.ts`.
305
- return (_h = ((_g = (_f = (_e = (_d = (_c = (_b = (_a = this.msg) !== null && _a !== void 0 ? _a : this.messageReaction) !== null && _b !== void 0 ? _b : this.messageReactionCount) !== null && _c !== void 0 ? _c : this.myChatMember) !== null && _d !== void 0 ? _d : this.chatMember) !== null && _e !== void 0 ? _e : this.chatJoinRequest) !== null && _f !== void 0 ? _f : this.chatBoost) !== null && _g !== void 0 ? _g : this.removedChatBoost)) === null || _h === void 0 ? void 0 : _h.chat;
322
+ return (_j = ((_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = this.msg) !== null && _a !== void 0 ? _a : this.deletedBusinessMessages) !== null && _b !== void 0 ? _b : this.messageReaction) !== null && _c !== void 0 ? _c : this.messageReactionCount) !== null && _d !== void 0 ? _d : this.myChatMember) !== null && _e !== void 0 ? _e : this.chatMember) !== null && _f !== void 0 ? _f : this.chatJoinRequest) !== null && _g !== void 0 ? _g : this.chatBoost) !== null && _h !== void 0 ? _h : this.removedChatBoost)) === null || _j === void 0 ? void 0 : _j.chat;
306
323
  }
307
324
  /**
308
- * Get sender chat object from wherever possible. Alias for
325
+ * Get the sender chat object from wherever possible. Alias for
309
326
  * `ctx.msg?.sender_chat`.
310
327
  */
311
328
  get senderChat() {
312
329
  var _a;
330
+ // Keep in sync with types in `filter.ts`.
313
331
  return (_a = this.msg) === null || _a === void 0 ? void 0 : _a.sender_chat;
314
332
  }
315
333
  /**
316
- * Get message author from wherever possible. Alias for
317
- * `(ctx.callbackQuery?? ctx.inlineQuery ?? ctx.shippingQuery ??
318
- * ctx.preCheckoutQuery ?? ctx.chosenInlineResult ?? ctx.msg ??
319
- * ctx.myChatMember ?? ctx.chatMember ?? ctx.chatJoinRequest)?.from`
334
+ * Get the user object from wherever possible. Alias for
335
+ * `(this.businessConnection ?? this.messageReaction ??
336
+ * (this.chatBoost?.boost ?? this.removedChatBoost)?.source)?.user ??
337
+ * (this.msg ?? this.inlineQuery ?? this.chosenInlineResult ??
338
+ * this.callbackQuery ?? this.shippingQuery ?? this.preCheckoutQuery ??
339
+ * this.myChatMember ?? this.chatMember ?? this.chatJoinRequest)?.from`.
320
340
  */
321
341
  get from() {
322
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
342
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
343
+ // Keep in sync with types in `filter.ts`.
344
+ return (_g = (_f = ((_b = (_a = this.businessConnection) !== null && _a !== void 0 ? _a : this.messageReaction) !== null && _b !== void 0 ? _b : (_e = ((_d = (_c = this.chatBoost) === null || _c === void 0 ? void 0 : _c.boost) !== null && _d !== void 0 ? _d : this.removedChatBoost)) === null || _e === void 0 ? void 0 : _e.source)) === null || _f === void 0 ? void 0 : _f.user) !== null && _g !== void 0 ? _g : (_r = ((_q = (_p = (_o = (_m = (_l = (_k = (_j = (_h = this.msg) !== null && _h !== void 0 ? _h : this.inlineQuery) !== null && _j !== void 0 ? _j : this.chosenInlineResult) !== null && _k !== void 0 ? _k : this.callbackQuery) !== null && _l !== void 0 ? _l : this.shippingQuery) !== null && _m !== void 0 ? _m : this.preCheckoutQuery) !== null && _o !== void 0 ? _o : this.myChatMember) !== null && _p !== void 0 ? _p : this.chatMember) !== null && _q !== void 0 ? _q : this.chatJoinRequest)) === null || _r === void 0 ? void 0 : _r.from;
345
+ }
346
+ /**
347
+ * Get the message identifier from wherever possible. Alias for
348
+ * `this.msg?.message_id ?? this.messageReaction?.message_id ??
349
+ * this.messageReactionCount?.message_id`.
350
+ */
351
+ get msgId() {
352
+ var _a, _b, _c, _d, _e;
323
353
  // Keep in sync with types in `filter.ts`.
324
- return (_b = (_a = this.messageReaction) === null || _a === void 0 ? void 0 : _a.user) !== null && _b !== void 0 ? _b : (_l = ((_k = (_j = (_h = (_g = (_f = (_e = (_d = (_c = this.callbackQuery) !== null && _c !== void 0 ? _c : this.inlineQuery) !== null && _d !== void 0 ? _d : this.shippingQuery) !== null && _e !== void 0 ? _e : this.preCheckoutQuery) !== null && _f !== void 0 ? _f : this.chosenInlineResult) !== null && _g !== void 0 ? _g : this.msg) !== null && _h !== void 0 ? _h : this.myChatMember) !== null && _j !== void 0 ? _j : this.chatMember) !== null && _k !== void 0 ? _k : this.chatJoinRequest)) === null || _l === void 0 ? void 0 : _l.from;
354
+ return (_d = (_b = (_a = this.msg) === null || _a === void 0 ? void 0 : _a.message_id) !== null && _b !== void 0 ? _b : (_c = this.messageReaction) === null || _c === void 0 ? void 0 : _c.message_id) !== null && _d !== void 0 ? _d : (_e = this.messageReactionCount) === null || _e === void 0 ? void 0 : _e.message_id;
325
355
  }
326
356
  /**
327
- * Get inline message ID from wherever possible. Alias for
328
- * `(ctx.callbackQuery ?? ctx.chosenInlineResult)?.inline_message_id`
357
+ * Get the inline message identifier from wherever possible. Alias for
358
+ * `(ctx.callbackQuery ?? ctx.chosenInlineResult)?.inline_message_id`.
329
359
  */
330
360
  get inlineMessageId() {
331
361
  var _a, _b, _c;
332
362
  return ((_b = (_a = this.callbackQuery) === null || _a === void 0 ? void 0 : _a.inline_message_id) !== null && _b !== void 0 ? _b : (_c = this.chosenInlineResult) === null || _c === void 0 ? void 0 : _c.inline_message_id);
333
363
  }
364
+ /**
365
+ * Get the business connection identifier from wherever possible. Alias for
366
+ * `this.msg?.business_connection_id ?? this.businessConnection?.id ??
367
+ * this.deletedBusinessMessages?.business_connection_id`.
368
+ */
369
+ get businessConnectionId() {
370
+ var _a, _b, _c, _d, _e;
371
+ return (_d = (_b = (_a = this.msg) === null || _a === void 0 ? void 0 : _a.business_connection_id) !== null && _b !== void 0 ? _b : (_c = this.businessConnection) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : (_e = this.deletedBusinessMessages) === null || _e === void 0 ? void 0 : _e.business_connection_id;
372
+ }
334
373
  entities(types) {
335
374
  var _a, _b;
336
375
  const message = this.msg;
@@ -553,7 +592,7 @@ class Context {
553
592
  * **Official reference:** https://core.telegram.org/bots/api#sendmessage
554
593
  */
555
594
  reply(text, other, signal) {
556
- return this.api.sendMessage(orThrow(this.chat, "sendMessage").id, text, other, signal);
595
+ return this.api.sendMessage(orThrow(this.chat, "sendMessage").id, text, { business_connection_id: this.businessConnectionId, ...other }, signal);
557
596
  }
558
597
  /**
559
598
  * Context-aware alias for `api.forwardMessage`. Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.
@@ -565,14 +604,13 @@ class Context {
565
604
  * **Official reference:** https://core.telegram.org/bots/api#forwardmessage
566
605
  */
567
606
  forwardMessage(chat_id, other, signal) {
568
- var _a, _b, _c, _d, _e;
569
- return this.api.forwardMessage(chat_id, orThrow(this.chat, "forwardMessage").id, orThrow((_d = (_b = (_a = this.msg) === null || _a === void 0 ? void 0 : _a.message_id) !== null && _b !== void 0 ? _b : (_c = this.messageReaction) === null || _c === void 0 ? void 0 : _c.message_id) !== null && _d !== void 0 ? _d : (_e = this.messageReactionCount) === null || _e === void 0 ? void 0 : _e.message_id, "forwardMessage"), other, signal);
607
+ return this.api.forwardMessage(chat_id, orThrow(this.chat, "forwardMessage").id, orThrow(this.msgId, "forwardMessage"), other, signal);
570
608
  }
571
609
  /**
572
610
  * Context-aware alias for `api.forwardMessages`. Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.
573
611
  *
574
612
  * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
575
- * @param message_ids Identifiers of 1-100 messages in the current chat to forward. The identifiers must be specified in a strictly increasing order.
613
+ * @param message_ids A list of 1-100 identifiers of messages in the current chat to forward. The identifiers must be specified in a strictly increasing order.
576
614
  * @param other Optional remaining parameters, confer the official reference below
577
615
  * @param signal Optional `AbortSignal` to cancel the request
578
616
  *
@@ -591,14 +629,13 @@ class Context {
591
629
  * **Official reference:** https://core.telegram.org/bots/api#copymessage
592
630
  */
593
631
  copyMessage(chat_id, other, signal) {
594
- var _a, _b, _c, _d, _e;
595
- return this.api.copyMessage(chat_id, orThrow(this.chat, "copyMessage").id, orThrow((_d = (_b = (_a = this.msg) === null || _a === void 0 ? void 0 : _a.message_id) !== null && _b !== void 0 ? _b : (_c = this.messageReaction) === null || _c === void 0 ? void 0 : _c.message_id) !== null && _d !== void 0 ? _d : (_e = this.messageReactionCount) === null || _e === void 0 ? void 0 : _e.message_id, "copyMessage"), other, signal);
632
+ return this.api.copyMessage(chat_id, orThrow(this.chat, "copyMessage").id, orThrow(this.msgId, "copyMessage"), other, signal);
596
633
  }
597
634
  /**
598
635
  * Context-aware alias for `api.copyMessages`.Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.
599
636
  *
600
637
  * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
601
- * @param message_ids Identifiers of 1-100 messages in the current chat to copy. The identifiers must be specified in a strictly increasing order.
638
+ * @param message_ids A list of 1-100 identifiers of messages in the current chat to copy. The identifiers must be specified in a strictly increasing order.
602
639
  * @param other Optional remaining parameters, confer the official reference below
603
640
  * @param signal Optional `AbortSignal` to cancel the request
604
641
  *
@@ -617,7 +654,7 @@ class Context {
617
654
  * **Official reference:** https://core.telegram.org/bots/api#sendphoto
618
655
  */
619
656
  replyWithPhoto(photo, other, signal) {
620
- return this.api.sendPhoto(orThrow(this.chat, "sendPhoto").id, photo, other, signal);
657
+ return this.api.sendPhoto(orThrow(this.chat, "sendPhoto").id, photo, { business_connection_id: this.businessConnectionId, ...other }, signal);
621
658
  }
622
659
  /**
623
660
  * Context-aware alias for `api.sendAudio`. Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
@@ -631,7 +668,7 @@ class Context {
631
668
  * **Official reference:** https://core.telegram.org/bots/api#sendaudio
632
669
  */
633
670
  replyWithAudio(audio, other, signal) {
634
- return this.api.sendAudio(orThrow(this.chat, "sendAudio").id, audio, other, signal);
671
+ return this.api.sendAudio(orThrow(this.chat, "sendAudio").id, audio, { business_connection_id: this.businessConnectionId, ...other }, signal);
635
672
  }
636
673
  /**
637
674
  * Context-aware alias for `api.sendDocument`. Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
@@ -643,7 +680,7 @@ class Context {
643
680
  * **Official reference:** https://core.telegram.org/bots/api#senddocument
644
681
  */
645
682
  replyWithDocument(document, other, signal) {
646
- return this.api.sendDocument(orThrow(this.chat, "sendDocument").id, document, other, signal);
683
+ return this.api.sendDocument(orThrow(this.chat, "sendDocument").id, document, { business_connection_id: this.businessConnectionId, ...other }, signal);
647
684
  }
648
685
  /**
649
686
  * Context-aware alias for `api.sendVideo`. Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
@@ -655,7 +692,7 @@ class Context {
655
692
  * **Official reference:** https://core.telegram.org/bots/api#sendvideo
656
693
  */
657
694
  replyWithVideo(video, other, signal) {
658
- return this.api.sendVideo(orThrow(this.chat, "sendVideo").id, video, other, signal);
695
+ return this.api.sendVideo(orThrow(this.chat, "sendVideo").id, video, { business_connection_id: this.businessConnectionId, ...other }, signal);
659
696
  }
660
697
  /**
661
698
  * Context-aware alias for `api.sendAnimation`. Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
@@ -667,7 +704,7 @@ class Context {
667
704
  * **Official reference:** https://core.telegram.org/bots/api#sendanimation
668
705
  */
669
706
  replyWithAnimation(animation, other, signal) {
670
- return this.api.sendAnimation(orThrow(this.chat, "sendAnimation").id, animation, other, signal);
707
+ return this.api.sendAnimation(orThrow(this.chat, "sendAnimation").id, animation, { business_connection_id: this.businessConnectionId, ...other }, signal);
671
708
  }
672
709
  /**
673
710
  * Context-aware alias for `api.sendVoice`. Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
@@ -679,7 +716,7 @@ class Context {
679
716
  * **Official reference:** https://core.telegram.org/bots/api#sendvoice
680
717
  */
681
718
  replyWithVoice(voice, other, signal) {
682
- return this.api.sendVoice(orThrow(this.chat, "sendVoice").id, voice, other, signal);
719
+ return this.api.sendVoice(orThrow(this.chat, "sendVoice").id, voice, { business_connection_id: this.businessConnectionId, ...other }, signal);
683
720
  }
684
721
  /**
685
722
  * Context-aware alias for `api.sendVideoNote`. Use this method to send video messages. On success, the sent Message is returned.
@@ -692,7 +729,7 @@ class Context {
692
729
  * **Official reference:** https://core.telegram.org/bots/api#sendvideonote
693
730
  */
694
731
  replyWithVideoNote(video_note, other, signal) {
695
- return this.api.sendVideoNote(orThrow(this.chat, "sendVideoNote").id, video_note, other, signal);
732
+ return this.api.sendVideoNote(orThrow(this.chat, "sendVideoNote").id, video_note, { business_connection_id: this.businessConnectionId, ...other }, signal);
696
733
  }
697
734
  /**
698
735
  * Context-aware alias for `api.sendMediaGroup`. Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
@@ -704,7 +741,7 @@ class Context {
704
741
  * **Official reference:** https://core.telegram.org/bots/api#sendmediagroup
705
742
  */
706
743
  replyWithMediaGroup(media, other, signal) {
707
- return this.api.sendMediaGroup(orThrow(this.chat, "sendMediaGroup").id, media, other, signal);
744
+ return this.api.sendMediaGroup(orThrow(this.chat, "sendMediaGroup").id, media, { business_connection_id: this.businessConnectionId, ...other }, signal);
708
745
  }
709
746
  /**
710
747
  * Context-aware alias for `api.sendLocation`. Use this method to send point on the map. On success, the sent Message is returned.
@@ -717,7 +754,7 @@ class Context {
717
754
  * **Official reference:** https://core.telegram.org/bots/api#sendlocation
718
755
  */
719
756
  replyWithLocation(latitude, longitude, other, signal) {
720
- return this.api.sendLocation(orThrow(this.chat, "sendLocation").id, latitude, longitude, other, signal);
757
+ return this.api.sendLocation(orThrow(this.chat, "sendLocation").id, latitude, longitude, { business_connection_id: this.businessConnectionId, ...other }, signal);
721
758
  }
722
759
  /**
723
760
  * Context-aware alias for `api.editMessageLiveLocation`. Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
@@ -730,11 +767,10 @@ class Context {
730
767
  * **Official reference:** https://core.telegram.org/bots/api#editmessagelivelocation
731
768
  */
732
769
  editMessageLiveLocation(latitude, longitude, other, signal) {
733
- var _a, _b, _c, _d, _e;
734
770
  const inlineId = this.inlineMessageId;
735
771
  return inlineId !== undefined
736
772
  ? this.api.editMessageLiveLocationInline(inlineId, latitude, longitude, other)
737
- : this.api.editMessageLiveLocation(orThrow(this.chat, "editMessageLiveLocation").id, orThrow((_d = (_b = (_a = this.msg) === null || _a === void 0 ? void 0 : _a.message_id) !== null && _b !== void 0 ? _b : (_c = this.messageReaction) === null || _c === void 0 ? void 0 : _c.message_id) !== null && _d !== void 0 ? _d : (_e = this.messageReactionCount) === null || _e === void 0 ? void 0 : _e.message_id, "editMessageLiveLocation"), latitude, longitude, other, signal);
773
+ : this.api.editMessageLiveLocation(orThrow(this.chat, "editMessageLiveLocation").id, orThrow(this.msgId, "editMessageLiveLocation"), latitude, longitude, other, signal);
738
774
  }
739
775
  /**
740
776
  * Context-aware alias for `api.stopMessageLiveLocation`. Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
@@ -745,11 +781,10 @@ class Context {
745
781
  * **Official reference:** https://core.telegram.org/bots/api#stopmessagelivelocation
746
782
  */
747
783
  stopMessageLiveLocation(other, signal) {
748
- var _a, _b, _c, _d, _e;
749
784
  const inlineId = this.inlineMessageId;
750
785
  return inlineId !== undefined
751
786
  ? this.api.stopMessageLiveLocationInline(inlineId, other)
752
- : this.api.stopMessageLiveLocation(orThrow(this.chat, "stopMessageLiveLocation").id, orThrow((_d = (_b = (_a = this.msg) === null || _a === void 0 ? void 0 : _a.message_id) !== null && _b !== void 0 ? _b : (_c = this.messageReaction) === null || _c === void 0 ? void 0 : _c.message_id) !== null && _d !== void 0 ? _d : (_e = this.messageReactionCount) === null || _e === void 0 ? void 0 : _e.message_id, "stopMessageLiveLocation"), other, signal);
787
+ : this.api.stopMessageLiveLocation(orThrow(this.chat, "stopMessageLiveLocation").id, orThrow(this.msgId, "stopMessageLiveLocation"), other, signal);
753
788
  }
754
789
  /**
755
790
  * Context-aware alias for `api.sendVenue`. Use this method to send information about a venue. On success, the sent Message is returned.
@@ -764,7 +799,7 @@ class Context {
764
799
  * **Official reference:** https://core.telegram.org/bots/api#sendvenue
765
800
  */
766
801
  replyWithVenue(latitude, longitude, title, address, other, signal) {
767
- return this.api.sendVenue(orThrow(this.chat, "sendVenue").id, latitude, longitude, title, address, other, signal);
802
+ return this.api.sendVenue(orThrow(this.chat, "sendVenue").id, latitude, longitude, title, address, { business_connection_id: this.businessConnectionId, ...other }, signal);
768
803
  }
769
804
  /**
770
805
  * Context-aware alias for `api.sendContact`. Use this method to send phone contacts. On success, the sent Message is returned.
@@ -777,7 +812,7 @@ class Context {
777
812
  * **Official reference:** https://core.telegram.org/bots/api#sendcontact
778
813
  */
779
814
  replyWithContact(phone_number, first_name, other, signal) {
780
- return this.api.sendContact(orThrow(this.chat, "sendContact").id, phone_number, first_name, other, signal);
815
+ return this.api.sendContact(orThrow(this.chat, "sendContact").id, phone_number, first_name, { business_connection_id: this.businessConnectionId, ...other }, signal);
781
816
  }
782
817
  /**
783
818
  * Context-aware alias for `api.sendPoll`. Use this method to send a native poll. On success, the sent Message is returned.
@@ -790,7 +825,7 @@ class Context {
790
825
  * **Official reference:** https://core.telegram.org/bots/api#sendpoll
791
826
  */
792
827
  replyWithPoll(question, options, other, signal) {
793
- return this.api.sendPoll(orThrow(this.chat, "sendPoll").id, question, options, other, signal);
828
+ return this.api.sendPoll(orThrow(this.chat, "sendPoll").id, question, options, { business_connection_id: this.businessConnectionId, ...other }, signal);
794
829
  }
795
830
  /**
796
831
  * Context-aware alias for `api.sendDice`. Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
@@ -802,25 +837,7 @@ class Context {
802
837
  * **Official reference:** https://core.telegram.org/bots/api#senddice
803
838
  */
804
839
  replyWithDice(emoji, other, signal) {
805
- return this.api.sendDice(orThrow(this.chat, "sendDice").id, emoji, other, signal);
806
- }
807
- /**
808
- * Context-aware alias for `api.setMessageReaction`. Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.
809
- *
810
- * @param reaction New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
811
- * @param other Optional remaining parameters, confer the official reference below
812
- * @param signal Optional `AbortSignal` to cancel the request
813
- *
814
- * **Official reference:** https://core.telegram.org/bots/api#senddice
815
- */
816
- react(reaction, other, signal) {
817
- var _a, _b, _c, _d, _e;
818
- return this.api.setMessageReaction(orThrow(this.chat, "setMessageReaction").id, orThrow((_d = (_b = (_a = this.msg) === null || _a === void 0 ? void 0 : _a.message_id) !== null && _b !== void 0 ? _b : (_c = this.messageReaction) === null || _c === void 0 ? void 0 : _c.message_id) !== null && _d !== void 0 ? _d : (_e = this.messageReactionCount) === null || _e === void 0 ? void 0 : _e.message_id, "setMessageReaction"), typeof reaction === "string"
819
- ? [{ type: "emoji", emoji: reaction }]
820
- : (Array.isArray(reaction) ? reaction : [reaction])
821
- .map((emoji) => typeof emoji === "string"
822
- ? { type: "emoji", emoji }
823
- : emoji), other, signal);
840
+ return this.api.sendDice(orThrow(this.chat, "sendDice").id, emoji, { business_connection_id: this.businessConnectionId, ...other }, signal);
824
841
  }
825
842
  /**
826
843
  * Context-aware alias for `api.sendChatAction`. Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
@@ -836,7 +853,24 @@ class Context {
836
853
  * **Official reference:** https://core.telegram.org/bots/api#sendchataction
837
854
  */
838
855
  replyWithChatAction(action, other, signal) {
839
- return this.api.sendChatAction(orThrow(this.chat, "sendChatAction").id, action, other, signal);
856
+ return this.api.sendChatAction(orThrow(this.chat, "sendChatAction").id, action, { business_connection_id: this.businessConnectionId, ...other }, signal);
857
+ }
858
+ /**
859
+ * Context-aware alias for `api.setMessageReaction`. Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.
860
+ *
861
+ * @param reaction A list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
862
+ * @param other Optional remaining parameters, confer the official reference below
863
+ * @param signal Optional `AbortSignal` to cancel the request
864
+ *
865
+ * **Official reference:** https://core.telegram.org/bots/api#setmessagereaction
866
+ */
867
+ react(reaction, other, signal) {
868
+ return this.api.setMessageReaction(orThrow(this.chat, "setMessageReaction").id, orThrow(this.msgId, "setMessageReaction"), typeof reaction === "string"
869
+ ? [{ type: "emoji", emoji: reaction }]
870
+ : (Array.isArray(reaction) ? reaction : [reaction])
871
+ .map((emoji) => typeof emoji === "string"
872
+ ? { type: "emoji", emoji }
873
+ : emoji), other, signal);
840
874
  }
841
875
  /**
842
876
  * Context-aware alias for `api.getUserProfilePhotos`. Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
@@ -861,6 +895,15 @@ class Context {
861
895
  getUserChatBoosts(chat_id, signal) {
862
896
  return this.api.getUserChatBoosts(chat_id, orThrow(this.from, "getUserChatBoosts").id, signal);
863
897
  }
898
+ /**
899
+ * Context-aware alias for `api.getBusinessConnection`. Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.
900
+ * @param signal Optional `AbortSignal` to cancel the request
901
+ *
902
+ * **Official reference:** https://core.telegram.org/bots/api#getbusinessconnection
903
+ */
904
+ getBusinessConnection(signal) {
905
+ return this.api.getBusinessConnection(orThrow(this.businessConnectionId, "getBusinessConnection"), signal);
906
+ }
864
907
  /**
865
908
  * Context-aware alias for `api.getFile`. Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
866
909
  *
@@ -1541,7 +1584,7 @@ class Context {
1541
1584
  * Context-aware alias for `api.deleteMessages`. Use this method to delete multiple messages simultaneously. Returns True on success.
1542
1585
  *
1543
1586
  * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1544
- * @param message_ids Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted
1587
+ * @param message_ids A list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted
1545
1588
  * @param signal Optional `AbortSignal` to cancel the request
1546
1589
  *
1547
1590
  * **Official reference:** https://core.telegram.org/bots/api#deletemessages
@@ -1552,19 +1595,19 @@ class Context {
1552
1595
  /**
1553
1596
  * Context-aware alias for `api.sendSticker`. Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.
1554
1597
  *
1555
- * @param sticker Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data.
1598
+ * @param sticker Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. Video and animated stickers can't be sent via an HTTP URL.
1556
1599
  * @param other Optional remaining parameters, confer the official reference below
1557
1600
  * @param signal Optional `AbortSignal` to cancel the request
1558
1601
  *
1559
1602
  * **Official reference:** https://core.telegram.org/bots/api#sendsticker
1560
1603
  */
1561
1604
  replyWithSticker(sticker, other, signal) {
1562
- return this.api.sendSticker(orThrow(this.chat, "sendSticker").id, sticker, other, signal);
1605
+ return this.api.sendSticker(orThrow(this.chat, "sendSticker").id, sticker, { business_connection_id: this.businessConnectionId, ...other }, signal);
1563
1606
  }
1564
1607
  /**
1565
1608
  * Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
1566
1609
  *
1567
- * @param custom_emoji_ids List of custom emoji identifiers
1610
+ * @param custom_emoji_ids A list of custom emoji identifiers
1568
1611
  * @param signal Optional `AbortSignal` to cancel the request
1569
1612
  *
1570
1613
  * **Official reference:** https://core.telegram.org/bots/api#getcustomemojistickers
@@ -1655,7 +1698,7 @@ class Context {
1655
1698
  * **Official reference:** https://core.telegram.org/bots/api#sendgame
1656
1699
  */
1657
1700
  replyWithGame(game_short_name, other, signal) {
1658
- return this.api.sendGame(orThrow(this.chat, "sendGame").id, game_short_name, other, signal);
1701
+ return this.api.sendGame(orThrow(this.chat, "sendGame").id, game_short_name, { business_connection_id: this.businessConnectionId, ...other }, signal);
1659
1702
  }
1660
1703
  }
1661
1704
  exports.Context = Context;
@@ -117,7 +117,7 @@ const fastify = (req, reply) => ({
117
117
  update: Promise.resolve(req.body),
118
118
  header: req.headers[SECRET_HEADER_LOWERCASE],
119
119
  end: () => reply.status(200).send(),
120
- respond: (json) => reply.send(json),
120
+ respond: (json) => reply.headers({ "Content-Type": "application/json" }).send(json),
121
121
  unauthorized: () => reply.code(401).send(WRONG_TOKEN_ERROR),
122
122
  });
123
123
  /** hono web framework */