@yaebal/contexts 0.0.4 → 0.0.5

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 (112) hide show
  1. package/lib/generated/business-connection.d.ts +48 -0
  2. package/lib/generated/business-connection.d.ts.map +1 -1
  3. package/lib/generated/business-connection.js +96 -0
  4. package/lib/generated/business-connection.js.map +1 -1
  5. package/lib/generated/business-message.d.ts +83 -41
  6. package/lib/generated/business-message.d.ts.map +1 -1
  7. package/lib/generated/business-message.js +125 -41
  8. package/lib/generated/business-message.js.map +1 -1
  9. package/lib/generated/callback-query.d.ts +40 -40
  10. package/lib/generated/callback-query.d.ts.map +1 -1
  11. package/lib/generated/callback-query.js +40 -40
  12. package/lib/generated/callback-query.js.map +1 -1
  13. package/lib/generated/channel-post.d.ts +33 -35
  14. package/lib/generated/channel-post.d.ts.map +1 -1
  15. package/lib/generated/channel-post.js +37 -41
  16. package/lib/generated/channel-post.js.map +1 -1
  17. package/lib/generated/chat-boost.d.ts +0 -12
  18. package/lib/generated/chat-boost.d.ts.map +1 -1
  19. package/lib/generated/chat-boost.js +0 -24
  20. package/lib/generated/chat-boost.js.map +1 -1
  21. package/lib/generated/chat-join-request.d.ts +0 -12
  22. package/lib/generated/chat-join-request.d.ts.map +1 -1
  23. package/lib/generated/chat-join-request.js +0 -24
  24. package/lib/generated/chat-join-request.js.map +1 -1
  25. package/lib/generated/chat-member.d.ts +0 -12
  26. package/lib/generated/chat-member.d.ts.map +1 -1
  27. package/lib/generated/chat-member.js +0 -24
  28. package/lib/generated/chat-member.js.map +1 -1
  29. package/lib/generated/deleted-business-messages.d.ts +68 -38
  30. package/lib/generated/deleted-business-messages.d.ts.map +1 -1
  31. package/lib/generated/deleted-business-messages.js +108 -48
  32. package/lib/generated/deleted-business-messages.js.map +1 -1
  33. package/lib/generated/edited-business-message.d.ts +83 -41
  34. package/lib/generated/edited-business-message.d.ts.map +1 -1
  35. package/lib/generated/edited-business-message.js +125 -41
  36. package/lib/generated/edited-business-message.js.map +1 -1
  37. package/lib/generated/edited-channel-post.d.ts +33 -35
  38. package/lib/generated/edited-channel-post.d.ts.map +1 -1
  39. package/lib/generated/edited-channel-post.js +37 -41
  40. package/lib/generated/edited-channel-post.js.map +1 -1
  41. package/lib/generated/edited-message.d.ts +33 -35
  42. package/lib/generated/edited-message.d.ts.map +1 -1
  43. package/lib/generated/edited-message.js +37 -41
  44. package/lib/generated/edited-message.js.map +1 -1
  45. package/lib/generated/guest-message.d.ts +33 -35
  46. package/lib/generated/guest-message.d.ts.map +1 -1
  47. package/lib/generated/guest-message.js +37 -41
  48. package/lib/generated/guest-message.js.map +1 -1
  49. package/lib/generated/message-reaction-count.d.ts +0 -16
  50. package/lib/generated/message-reaction-count.d.ts.map +1 -1
  51. package/lib/generated/message-reaction-count.js +0 -32
  52. package/lib/generated/message-reaction-count.js.map +1 -1
  53. package/lib/generated/message-reaction.d.ts +0 -16
  54. package/lib/generated/message-reaction.d.ts.map +1 -1
  55. package/lib/generated/message-reaction.js +0 -32
  56. package/lib/generated/message-reaction.js.map +1 -1
  57. package/lib/generated/message.d.ts +33 -35
  58. package/lib/generated/message.d.ts.map +1 -1
  59. package/lib/generated/message.js +37 -41
  60. package/lib/generated/message.js.map +1 -1
  61. package/lib/generated/my-chat-member.d.ts +0 -12
  62. package/lib/generated/my-chat-member.d.ts.map +1 -1
  63. package/lib/generated/my-chat-member.js +0 -24
  64. package/lib/generated/my-chat-member.js.map +1 -1
  65. package/lib/generated/removed-chat-boost.d.ts +0 -12
  66. package/lib/generated/removed-chat-boost.d.ts.map +1 -1
  67. package/lib/generated/removed-chat-boost.js +0 -24
  68. package/lib/generated/removed-chat-boost.js.map +1 -1
  69. package/lib/index.test.js +172 -1
  70. package/lib/index.test.js.map +1 -1
  71. package/lib/sugar/business-message.d.ts +12 -3
  72. package/lib/sugar/business-message.d.ts.map +1 -1
  73. package/lib/sugar/business-message.js +12 -1
  74. package/lib/sugar/business-message.js.map +1 -1
  75. package/lib/sugar/channel-post.d.ts +5 -2
  76. package/lib/sugar/channel-post.d.ts.map +1 -1
  77. package/lib/sugar/edited-business-message.d.ts +12 -3
  78. package/lib/sugar/edited-business-message.d.ts.map +1 -1
  79. package/lib/sugar/edited-business-message.js +12 -1
  80. package/lib/sugar/edited-business-message.js.map +1 -1
  81. package/lib/sugar/edited-channel-post.d.ts +5 -2
  82. package/lib/sugar/edited-channel-post.d.ts.map +1 -1
  83. package/lib/sugar/edited-message.d.ts +5 -2
  84. package/lib/sugar/edited-message.d.ts.map +1 -1
  85. package/lib/sugar/message-mixin.d.ts +6 -0
  86. package/lib/sugar/message-mixin.d.ts.map +1 -1
  87. package/lib/sugar/message-mixin.js +32 -1
  88. package/lib/sugar/message-mixin.js.map +1 -1
  89. package/lib/sugar/message.d.ts +5 -2
  90. package/lib/sugar/message.d.ts.map +1 -1
  91. package/package.json +2 -2
  92. package/src/generated/business-connection.ts +96 -0
  93. package/src/generated/business-message.ts +166 -82
  94. package/src/generated/callback-query.ts +80 -80
  95. package/src/generated/channel-post.ts +66 -70
  96. package/src/generated/chat-boost.ts +0 -24
  97. package/src/generated/chat-join-request.ts +0 -24
  98. package/src/generated/chat-member.ts +0 -24
  99. package/src/generated/deleted-business-messages.ts +136 -76
  100. package/src/generated/edited-business-message.ts +166 -82
  101. package/src/generated/edited-channel-post.ts +66 -70
  102. package/src/generated/edited-message.ts +66 -70
  103. package/src/generated/guest-message.ts +66 -70
  104. package/src/generated/message-reaction-count.ts +0 -32
  105. package/src/generated/message-reaction.ts +0 -32
  106. package/src/generated/message.ts +66 -70
  107. package/src/generated/my-chat-member.ts +0 -24
  108. package/src/generated/removed-chat-boost.ts +0 -24
  109. package/src/index.test.ts +193 -0
  110. package/src/sugar/business-message.ts +14 -2
  111. package/src/sugar/edited-business-message.ts +14 -2
  112. package/src/sugar/message-mixin.ts +41 -1
@@ -35,85 +35,89 @@ export class GuestMessageContextBase {
35
35
  get messageId(): number {
36
36
  return this.message_id;
37
37
  }
38
+ /** camel-case alias for `business_connection_id`. */
39
+ get businessConnectionId(): string | undefined {
40
+ return this.business_connection_id;
41
+ }
42
+ /** camel-case alias for `message_thread_id` (the forum topic this message is in, if any). */
43
+ get messageThreadId(): number | undefined {
44
+ return this.message_thread_id;
45
+ }
38
46
  /** reply to this message. */
39
- reply(params: Omit<t.SendMessageParams, "chat_id">) {
40
- return this.api.call<t.Message>("sendMessage", { chat_id: this.chat.id, reply_parameters: { message_id: this.message_id }, ...params });
47
+ reply(params: Omit<t.SendMessageParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
48
+ return this.api.call<t.Message>("sendMessage", { chat_id: this.chat.id, reply_parameters: { message_id: this.message_id }, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
41
49
  }
42
50
  /** Use this method to send text messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
43
- send(params: Omit<t.SendMessageParams, "chat_id">) {
44
- return this.api.call<t.Message>("sendMessage", { chat_id: this.chat.id, ...params });
51
+ send(params: Omit<t.SendMessageParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
52
+ return this.api.call<t.Message>("sendMessage", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
45
53
  }
46
54
  /** Use this method to send photos. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
47
- sendPhoto(params: Omit<t.SendPhotoParams, "chat_id">) {
48
- return this.api.call<t.Message>("sendPhoto", { chat_id: this.chat.id, ...params });
55
+ sendPhoto(params: Omit<t.SendPhotoParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
56
+ return this.api.call<t.Message>("sendPhoto", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
49
57
  }
50
58
  /** Use this method to send live photos. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
51
- sendLivePhoto(params: Omit<t.SendLivePhotoParams, "chat_id">) {
52
- return this.api.call<t.Message>("sendLivePhoto", { chat_id: this.chat.id, ...params });
59
+ sendLivePhoto(params: Omit<t.SendLivePhotoParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
60
+ return this.api.call<t.Message>("sendLivePhoto", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
53
61
  }
54
62
  /** 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](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api/#sendvoice) method instead. */
55
- sendAudio(params: Omit<t.SendAudioParams, "chat_id">) {
56
- return this.api.call<t.Message>("sendAudio", { chat_id: this.chat.id, ...params });
63
+ sendAudio(params: Omit<t.SendAudioParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
64
+ return this.api.call<t.Message>("sendAudio", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
57
65
  }
58
66
  /** Use this method to send general files. On success, the sent [Message](https://core.telegram.org/bots/api/#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. */
59
- sendDocument(params: Omit<t.SendDocumentParams, "chat_id">) {
60
- return this.api.call<t.Message>("sendDocument", { chat_id: this.chat.id, ...params });
67
+ sendDocument(params: Omit<t.SendDocumentParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
68
+ return this.api.call<t.Message>("sendDocument", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
61
69
  }
62
70
  /** Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. */
63
- sendVideo(params: Omit<t.SendVideoParams, "chat_id">) {
64
- return this.api.call<t.Message>("sendVideo", { chat_id: this.chat.id, ...params });
71
+ sendVideo(params: Omit<t.SendVideoParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
72
+ return this.api.call<t.Message>("sendVideo", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
65
73
  }
66
74
  /** Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. */
67
- sendAnimation(params: Omit<t.SendAnimationParams, "chat_id">) {
68
- return this.api.call<t.Message>("sendAnimation", { chat_id: this.chat.id, ...params });
75
+ sendAnimation(params: Omit<t.SendAnimationParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
76
+ return this.api.call<t.Message>("sendAnimation", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
69
77
  }
70
78
  /** 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, or in .MP3 format, or in .M4A format (other formats may be sent as [Audio](https://core.telegram.org/bots/api/#audio) or [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
71
- sendVoice(params: Omit<t.SendVoiceParams, "chat_id">) {
72
- return this.api.call<t.Message>("sendVoice", { chat_id: this.chat.id, ...params });
79
+ sendVoice(params: Omit<t.SendVoiceParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
80
+ return this.api.call<t.Message>("sendVoice", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
73
81
  }
74
82
  /** As of [v.4.0](https://telegram.org/blog/video-messages-and-telescope), Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
75
- sendVideoNote(params: Omit<t.SendVideoNoteParams, "chat_id">) {
76
- return this.api.call<t.Message>("sendVideoNote", { chat_id: this.chat.id, ...params });
83
+ sendVideoNote(params: Omit<t.SendVideoNoteParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
84
+ return this.api.call<t.Message>("sendVideoNote", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
77
85
  }
78
86
  /** Use this method to send paid media. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
79
- sendPaidMedia(params: Omit<t.SendPaidMediaParams, "chat_id">) {
80
- return this.api.call<t.Message>("sendPaidMedia", { chat_id: this.chat.id, ...params });
87
+ sendPaidMedia(params: Omit<t.SendPaidMediaParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
88
+ return this.api.call<t.Message>("sendPaidMedia", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
81
89
  }
82
90
  /** Use this method to send a group of photos, live 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 [Message](https://core.telegram.org/bots/api/#message) objects that were sent is returned. */
83
- sendMediaGroup(params: Omit<t.SendMediaGroupParams, "chat_id">) {
84
- return this.api.call<t.Message[]>("sendMediaGroup", { chat_id: this.chat.id, ...params });
91
+ sendMediaGroup(params: Omit<t.SendMediaGroupParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
92
+ return this.api.call<t.Message[]>("sendMediaGroup", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
85
93
  }
86
94
  /** Use this method to send point on the map. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
87
- sendLocation(params: Omit<t.SendLocationParams, "chat_id">) {
88
- return this.api.call<t.Message>("sendLocation", { chat_id: this.chat.id, ...params });
95
+ sendLocation(params: Omit<t.SendLocationParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
96
+ return this.api.call<t.Message>("sendLocation", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
89
97
  }
90
98
  /** Use this method to send information about a venue. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
91
- sendVenue(params: Omit<t.SendVenueParams, "chat_id">) {
92
- return this.api.call<t.Message>("sendVenue", { chat_id: this.chat.id, ...params });
99
+ sendVenue(params: Omit<t.SendVenueParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
100
+ return this.api.call<t.Message>("sendVenue", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
93
101
  }
94
102
  /** Use this method to send phone contacts. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
95
- sendContact(params: Omit<t.SendContactParams, "chat_id">) {
96
- return this.api.call<t.Message>("sendContact", { chat_id: this.chat.id, ...params });
103
+ sendContact(params: Omit<t.SendContactParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
104
+ return this.api.call<t.Message>("sendContact", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
97
105
  }
98
106
  /** Use this method to send a native poll. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
99
- sendPoll(params: Omit<t.SendPollParams, "chat_id">) {
100
- return this.api.call<t.Message>("sendPoll", { chat_id: this.chat.id, ...params });
101
- }
102
- /** Use this method to send a checklist on behalf of a connected business account. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
103
- sendChecklist(params: Omit<t.SendChecklistParams, "chat_id">) {
104
- return this.api.call<t.Message>("sendChecklist", { chat_id: this.chat.id, ...params });
107
+ sendPoll(params: Omit<t.SendPollParams, "chat_id" | "message_thread_id">) {
108
+ return this.api.call<t.Message>("sendPoll", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
105
109
  }
106
110
  /** Use this method to send an animated emoji that will display a random value. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
107
- sendDice(params: Omit<t.SendDiceParams, "chat_id">) {
108
- return this.api.call<t.Message>("sendDice", { chat_id: this.chat.id, ...params });
111
+ sendDice(params: Omit<t.SendDiceParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
112
+ return this.api.call<t.Message>("sendDice", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
109
113
  }
110
114
  /** Use this method to stream a partial message to a user while the message is being generated. Note that the streamed draft is ephemeral and acts as a temporary 30-second preview - once the output is finalized, you **must** call [sendMessage](https://core.telegram.org/bots/api/#sendmessage) with the complete message to persist it in the user's chat. Returns *True* on success. */
111
- sendMessageDraft(params: Omit<t.SendMessageDraftParams, "chat_id">) {
112
- return this.api.call<boolean>("sendMessageDraft", { chat_id: this.chat.id, ...params });
115
+ sendMessageDraft(params: Omit<t.SendMessageDraftParams, "chat_id" | "message_thread_id">) {
116
+ return this.api.call<boolean>("sendMessageDraft", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
113
117
  }
114
118
  /** 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. Example: The [ImageBot](https://t.me/imagebot) needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use [sendChatAction](https://core.telegram.org/bots/api/#sendchataction) with *action* = *upload\_photo*. The user will see a “sending photo” status for the bot. We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. */
115
- sendChatAction(params: Omit<t.SendChatActionParams, "chat_id">) {
116
- return this.api.call<boolean>("sendChatAction", { chat_id: this.chat.id, ...params });
119
+ sendChatAction(params: Omit<t.SendChatActionParams, "chat_id" | "message_thread_id">) {
120
+ return this.api.call<boolean>("sendChatAction", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
117
121
  }
118
122
  /** Use this method to change the chosen reactions on a message. Service messages of some types 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. Bots can't use paid reactions. Returns *True* on success. */
119
123
  react(params: Omit<t.SetMessageReactionParams, "chat_id" | "message_id">) {
@@ -264,24 +268,24 @@ export class GuestMessageContextBase {
264
268
  return this.api.call<t.ForumTopic>("createForumTopic", { chat_id: this.chat.id, ...params });
265
269
  }
266
270
  /** Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
267
- editForumTopic(params: Omit<t.EditForumTopicParams, "chat_id">) {
268
- return this.api.call<boolean>("editForumTopic", { chat_id: this.chat.id, ...params });
271
+ editForumTopic(params: Omit<t.EditForumTopicParams, "chat_id" | "message_thread_id">) {
272
+ return this.api.call<boolean>("editForumTopic", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
269
273
  }
270
274
  /** Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
271
- closeForumTopic(params: Omit<t.CloseForumTopicParams, "chat_id">) {
272
- return this.api.call<boolean>("closeForumTopic", { chat_id: this.chat.id, ...params });
275
+ closeForumTopic(params?: Omit<t.CloseForumTopicParams, "chat_id" | "message_thread_id">) {
276
+ return this.api.call<boolean>("closeForumTopic", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
273
277
  }
274
278
  /** Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
275
- reopenForumTopic(params: Omit<t.ReopenForumTopicParams, "chat_id">) {
276
- return this.api.call<boolean>("reopenForumTopic", { chat_id: this.chat.id, ...params });
279
+ reopenForumTopic(params?: Omit<t.ReopenForumTopicParams, "chat_id" | "message_thread_id">) {
280
+ return this.api.call<boolean>("reopenForumTopic", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
277
281
  }
278
282
  /** Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_delete\_messages* administrator rights. Returns *True* on success. */
279
- deleteForumTopic(params: Omit<t.DeleteForumTopicParams, "chat_id">) {
280
- return this.api.call<boolean>("deleteForumTopic", { chat_id: this.chat.id, ...params });
283
+ deleteForumTopic(params?: Omit<t.DeleteForumTopicParams, "chat_id" | "message_thread_id">) {
284
+ return this.api.call<boolean>("deleteForumTopic", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
281
285
  }
282
286
  /** Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_pin\_messages* administrator right in the supergroup. Returns *True* on success. */
283
- unpinAllForumTopicMessages(params: Omit<t.UnpinAllForumTopicMessagesParams, "chat_id">) {
284
- return this.api.call<boolean>("unpinAllForumTopicMessages", { chat_id: this.chat.id, ...params });
287
+ unpinAllForumTopicMessages(params?: Omit<t.UnpinAllForumTopicMessagesParams, "chat_id" | "message_thread_id">) {
288
+ return this.api.call<boolean>("unpinAllForumTopicMessages", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
285
289
  }
286
290
  /** Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights. Returns *True* on success. */
287
291
  editGeneralForumTopic(params: Omit<t.EditGeneralForumTopicParams, "chat_id">) {
@@ -363,10 +367,6 @@ export class GuestMessageContextBase {
363
367
  removeChatVerification(params?: Omit<t.RemoveChatVerificationParams, "chat_id">) {
364
368
  return this.api.call<boolean>("removeChatVerification", { chat_id: this.chat.id, ...params });
365
369
  }
366
- /** Marks incoming message as read on behalf of a business account. Requires the *can\_read\_messages* business bot right. Returns *True* on success. */
367
- readBusinessMessage(params: Omit<t.ReadBusinessMessageParams, "chat_id" | "message_id">) {
368
- return this.api.call<boolean>("readBusinessMessage", { chat_id: this.chat.id, message_id: this.message_id, ...params });
369
- }
370
370
  /** Returns the gifts owned and hosted by a user. Returns [OwnedGifts](https://core.telegram.org/bots/api/#ownedgifts) on success. */
371
371
  getUserGifts(params: Omit<t.GetUserGiftsParams, "user_id">) {
372
372
  return this.api.call<t.OwnedGifts>("getUserGifts", { user_id: this.from?.id, ...params });
@@ -403,10 +403,6 @@ export class GuestMessageContextBase {
403
403
  stopMessageLiveLocation(params: Omit<t.StopMessageLiveLocationParams, "chat_id" | "message_id">) {
404
404
  return this.api.call<t.Message | boolean>("stopMessageLiveLocation", { chat_id: this.chat.id, message_id: this.message_id, ...params });
405
405
  }
406
- /** Use this method to edit a checklist on behalf of a connected business account. On success, the edited [Message](https://core.telegram.org/bots/api/#message) is returned. */
407
- editMessageChecklist(params: Omit<t.EditMessageChecklistParams, "chat_id" | "message_id">) {
408
- return this.api.call<t.Message>("editMessageChecklist", { chat_id: this.chat.id, message_id: this.message_id, ...params });
409
- }
410
406
  /** Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
411
407
  editReplyMarkup(params: Omit<t.EditMessageReplyMarkupParams, "chat_id" | "message_id">) {
412
408
  return this.api.call<t.Message | boolean>("editMessageReplyMarkup", { chat_id: this.chat.id, message_id: this.message_id, ...params });
@@ -440,8 +436,8 @@ export class GuestMessageContextBase {
440
436
  return this.api.call<boolean>("deleteAllMessageReactions", { chat_id: this.chat.id, user_id: this.from?.id, ...params });
441
437
  }
442
438
  /** Use this method to send static .WEBP, [animated](https://telegram.org/blog/animated-stickers) .TGS, or [video](https://telegram.org/blog/video-stickers-better-reactions) .WEBM stickers. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
443
- sendSticker(params: Omit<t.SendStickerParams, "chat_id">) {
444
- return this.api.call<t.Message>("sendSticker", { chat_id: this.chat.id, ...params });
439
+ sendSticker(params: Omit<t.SendStickerParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
440
+ return this.api.call<t.Message>("sendSticker", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
445
441
  }
446
442
  /** Use this method to upload a file with a sticker for later use in the [createNewStickerSet](https://core.telegram.org/bots/api/#createnewstickerset), [addStickerToSet](https://core.telegram.org/bots/api/#addstickertoset), or [replaceStickerInSet](https://core.telegram.org/bots/api/#replacestickerinset) methods (the file can be used multiple times). Returns the uploaded [File](https://core.telegram.org/bots/api/#file) on success. */
447
443
  uploadStickerFile(params: Omit<t.UploadStickerFileParams, "user_id">) {
@@ -464,16 +460,16 @@ export class GuestMessageContextBase {
464
460
  return this.api.call<boolean>("setStickerSetThumbnail", { user_id: this.from?.id, ...params });
465
461
  }
466
462
  /** Use this method to send rich messages. If the message contains a block with a media element, then the bot must have the right to send the media to the chat. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
467
- sendRichMessage(params: Omit<t.SendRichMessageParams, "chat_id">) {
468
- return this.api.call<t.Message>("sendRichMessage", { chat_id: this.chat.id, ...params });
463
+ sendRichMessage(params: Omit<t.SendRichMessageParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
464
+ return this.api.call<t.Message>("sendRichMessage", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
469
465
  }
470
466
  /** Use this method to stream a partial rich message to a user while the message is being generated. Note that the streamed draft is ephemeral and acts as a temporary 30-second preview - once the output is finalized, you **must** call [sendRichMessage](https://core.telegram.org/bots/api/#sendrichmessage) with the complete message to persist it in the user's chat. Returns *True* on success. */
471
- sendRichMessageDraft(params: Omit<t.SendRichMessageDraftParams, "chat_id">) {
472
- return this.api.call<boolean>("sendRichMessageDraft", { chat_id: this.chat.id, ...params });
467
+ sendRichMessageDraft(params: Omit<t.SendRichMessageDraftParams, "chat_id" | "message_thread_id">) {
468
+ return this.api.call<boolean>("sendRichMessageDraft", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
473
469
  }
474
470
  /** Use this method to send invoices. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
475
- sendInvoice(params: Omit<t.SendInvoiceParams, "chat_id">) {
476
- return this.api.call<t.Message>("sendInvoice", { chat_id: this.chat.id, ...params });
471
+ sendInvoice(params: Omit<t.SendInvoiceParams, "chat_id" | "message_thread_id" | "direct_messages_topic_id">) {
472
+ return this.api.call<t.Message>("sendInvoice", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...((this.direct_messages_topic?.topic_id) === undefined ? {} : { direct_messages_topic_id: this.direct_messages_topic?.topic_id }), ...params });
477
473
  }
478
474
  /** Refunds a successful payment in [Telegram Stars](https://t.me/BotNews/90). Returns *True* on success. */
479
475
  refundStarPayment(params: Omit<t.RefundStarPaymentParams, "user_id">) {
@@ -488,8 +484,8 @@ export class GuestMessageContextBase {
488
484
  return this.api.call<boolean>("setPassportDataErrors", { user_id: this.from?.id, ...params });
489
485
  }
490
486
  /** Use this method to send a game. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
491
- sendGame(params: Omit<t.SendGameParams, "chat_id">) {
492
- return this.api.call<t.Message>("sendGame", { chat_id: this.chat.id, ...params });
487
+ sendGame(params: Omit<t.SendGameParams, "chat_id" | "message_thread_id">) {
488
+ return this.api.call<t.Message>("sendGame", { chat_id: this.chat.id, ...((this.message_thread_id) === undefined ? {} : { message_thread_id: this.message_thread_id }), ...params });
493
489
  }
494
490
  /** Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is *False*. */
495
491
  setGameScore(params: Omit<t.SetGameScoreParams, "user_id" | "chat_id" | "message_id">) {
@@ -87,10 +87,6 @@ export class MessageReactionCountContext {
87
87
  sendPoll(params: Omit<t.SendPollParams, "chat_id">) {
88
88
  return this.api.call<t.Message>("sendPoll", { chat_id: this.chat.id, ...params });
89
89
  }
90
- /** Use this method to send a checklist on behalf of a connected business account. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
91
- sendChecklist(params: Omit<t.SendChecklistParams, "chat_id">) {
92
- return this.api.call<t.Message>("sendChecklist", { chat_id: this.chat.id, ...params });
93
- }
94
90
  /** Use this method to send an animated emoji that will display a random value. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
95
91
  sendDice(params: Omit<t.SendDiceParams, "chat_id">) {
96
92
  return this.api.call<t.Message>("sendDice", { chat_id: this.chat.id, ...params });
@@ -199,26 +195,6 @@ export class MessageReactionCountContext {
199
195
  createForumTopic(params: Omit<t.CreateForumTopicParams, "chat_id">) {
200
196
  return this.api.call<t.ForumTopic>("createForumTopic", { chat_id: this.chat.id, ...params });
201
197
  }
202
- /** Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
203
- editForumTopic(params: Omit<t.EditForumTopicParams, "chat_id">) {
204
- return this.api.call<boolean>("editForumTopic", { chat_id: this.chat.id, ...params });
205
- }
206
- /** Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
207
- closeForumTopic(params: Omit<t.CloseForumTopicParams, "chat_id">) {
208
- return this.api.call<boolean>("closeForumTopic", { chat_id: this.chat.id, ...params });
209
- }
210
- /** Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
211
- reopenForumTopic(params: Omit<t.ReopenForumTopicParams, "chat_id">) {
212
- return this.api.call<boolean>("reopenForumTopic", { chat_id: this.chat.id, ...params });
213
- }
214
- /** Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_delete\_messages* administrator rights. Returns *True* on success. */
215
- deleteForumTopic(params: Omit<t.DeleteForumTopicParams, "chat_id">) {
216
- return this.api.call<boolean>("deleteForumTopic", { chat_id: this.chat.id, ...params });
217
- }
218
- /** Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_pin\_messages* administrator right in the supergroup. Returns *True* on success. */
219
- unpinAllForumTopicMessages(params: Omit<t.UnpinAllForumTopicMessagesParams, "chat_id">) {
220
- return this.api.call<boolean>("unpinAllForumTopicMessages", { chat_id: this.chat.id, ...params });
221
- }
222
198
  /** Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights. Returns *True* on success. */
223
199
  editGeneralForumTopic(params: Omit<t.EditGeneralForumTopicParams, "chat_id">) {
224
200
  return this.api.call<boolean>("editGeneralForumTopic", { chat_id: this.chat.id, ...params });
@@ -263,10 +239,6 @@ export class MessageReactionCountContext {
263
239
  removeChatVerification(params?: Omit<t.RemoveChatVerificationParams, "chat_id">) {
264
240
  return this.api.call<boolean>("removeChatVerification", { chat_id: this.chat.id, ...params });
265
241
  }
266
- /** Marks incoming message as read on behalf of a business account. Requires the *can\_read\_messages* business bot right. Returns *True* on success. */
267
- readBusinessMessage(params: Omit<t.ReadBusinessMessageParams, "chat_id" | "message_id">) {
268
- return this.api.call<boolean>("readBusinessMessage", { chat_id: this.chat.id, message_id: this.message_id, ...params });
269
- }
270
242
  /** Returns the gifts owned by a chat. Returns [OwnedGifts](https://core.telegram.org/bots/api/#ownedgifts) on success. */
271
243
  getChatGifts(params: Omit<t.GetChatGiftsParams, "chat_id">) {
272
244
  return this.api.call<t.OwnedGifts>("getChatGifts", { chat_id: this.chat.id, ...params });
@@ -291,10 +263,6 @@ export class MessageReactionCountContext {
291
263
  stopMessageLiveLocation(params: Omit<t.StopMessageLiveLocationParams, "chat_id" | "message_id">) {
292
264
  return this.api.call<t.Message | boolean>("stopMessageLiveLocation", { chat_id: this.chat.id, message_id: this.message_id, ...params });
293
265
  }
294
- /** Use this method to edit a checklist on behalf of a connected business account. On success, the edited [Message](https://core.telegram.org/bots/api/#message) is returned. */
295
- editMessageChecklist(params: Omit<t.EditMessageChecklistParams, "chat_id" | "message_id">) {
296
- return this.api.call<t.Message>("editMessageChecklist", { chat_id: this.chat.id, message_id: this.message_id, ...params });
297
- }
298
266
  /** Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
299
267
  editReplyMarkup(params: Omit<t.EditMessageReplyMarkupParams, "chat_id" | "message_id">) {
300
268
  return this.api.call<t.Message | boolean>("editMessageReplyMarkup", { chat_id: this.chat.id, message_id: this.message_id, ...params });
@@ -95,10 +95,6 @@ export class MessageReactionContext {
95
95
  sendPoll(params: Omit<t.SendPollParams, "chat_id">) {
96
96
  return this.api.call<t.Message>("sendPoll", { chat_id: this.chat.id, ...params });
97
97
  }
98
- /** Use this method to send a checklist on behalf of a connected business account. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
99
- sendChecklist(params: Omit<t.SendChecklistParams, "chat_id">) {
100
- return this.api.call<t.Message>("sendChecklist", { chat_id: this.chat.id, ...params });
101
- }
102
98
  /** Use this method to send an animated emoji that will display a random value. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
103
99
  sendDice(params: Omit<t.SendDiceParams, "chat_id">) {
104
100
  return this.api.call<t.Message>("sendDice", { chat_id: this.chat.id, ...params });
@@ -207,26 +203,6 @@ export class MessageReactionContext {
207
203
  createForumTopic(params: Omit<t.CreateForumTopicParams, "chat_id">) {
208
204
  return this.api.call<t.ForumTopic>("createForumTopic", { chat_id: this.chat.id, ...params });
209
205
  }
210
- /** Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
211
- editForumTopic(params: Omit<t.EditForumTopicParams, "chat_id">) {
212
- return this.api.call<boolean>("editForumTopic", { chat_id: this.chat.id, ...params });
213
- }
214
- /** Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
215
- closeForumTopic(params: Omit<t.CloseForumTopicParams, "chat_id">) {
216
- return this.api.call<boolean>("closeForumTopic", { chat_id: this.chat.id, ...params });
217
- }
218
- /** Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
219
- reopenForumTopic(params: Omit<t.ReopenForumTopicParams, "chat_id">) {
220
- return this.api.call<boolean>("reopenForumTopic", { chat_id: this.chat.id, ...params });
221
- }
222
- /** Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_delete\_messages* administrator rights. Returns *True* on success. */
223
- deleteForumTopic(params: Omit<t.DeleteForumTopicParams, "chat_id">) {
224
- return this.api.call<boolean>("deleteForumTopic", { chat_id: this.chat.id, ...params });
225
- }
226
- /** Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can\_pin\_messages* administrator right in the supergroup. Returns *True* on success. */
227
- unpinAllForumTopicMessages(params: Omit<t.UnpinAllForumTopicMessagesParams, "chat_id">) {
228
- return this.api.call<boolean>("unpinAllForumTopicMessages", { chat_id: this.chat.id, ...params });
229
- }
230
206
  /** Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can\_manage\_topics* administrator rights. Returns *True* on success. */
231
207
  editGeneralForumTopic(params: Omit<t.EditGeneralForumTopicParams, "chat_id">) {
232
208
  return this.api.call<boolean>("editGeneralForumTopic", { chat_id: this.chat.id, ...params });
@@ -271,10 +247,6 @@ export class MessageReactionContext {
271
247
  removeChatVerification(params?: Omit<t.RemoveChatVerificationParams, "chat_id">) {
272
248
  return this.api.call<boolean>("removeChatVerification", { chat_id: this.chat.id, ...params });
273
249
  }
274
- /** Marks incoming message as read on behalf of a business account. Requires the *can\_read\_messages* business bot right. Returns *True* on success. */
275
- readBusinessMessage(params: Omit<t.ReadBusinessMessageParams, "chat_id" | "message_id">) {
276
- return this.api.call<boolean>("readBusinessMessage", { chat_id: this.chat.id, message_id: this.message_id, ...params });
277
- }
278
250
  /** Returns the gifts owned by a chat. Returns [OwnedGifts](https://core.telegram.org/bots/api/#ownedgifts) on success. */
279
251
  getChatGifts(params: Omit<t.GetChatGiftsParams, "chat_id">) {
280
252
  return this.api.call<t.OwnedGifts>("getChatGifts", { chat_id: this.chat.id, ...params });
@@ -299,10 +271,6 @@ export class MessageReactionContext {
299
271
  stopMessageLiveLocation(params: Omit<t.StopMessageLiveLocationParams, "chat_id" | "message_id">) {
300
272
  return this.api.call<t.Message | boolean>("stopMessageLiveLocation", { chat_id: this.chat.id, message_id: this.message_id, ...params });
301
273
  }
302
- /** Use this method to edit a checklist on behalf of a connected business account. On success, the edited [Message](https://core.telegram.org/bots/api/#message) is returned. */
303
- editMessageChecklist(params: Omit<t.EditMessageChecklistParams, "chat_id" | "message_id">) {
304
- return this.api.call<t.Message>("editMessageChecklist", { chat_id: this.chat.id, message_id: this.message_id, ...params });
305
- }
306
274
  /** Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
307
275
  editReplyMarkup(params: Omit<t.EditMessageReplyMarkupParams, "chat_id" | "message_id">) {
308
276
  return this.api.call<t.Message | boolean>("editMessageReplyMarkup", { chat_id: this.chat.id, message_id: this.message_id, ...params });