@grammyjs/types 3.4.0 → 3.4.2
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/message.d.ts +1 -1
- package/methods.d.ts +36 -0
- package/package.json +1 -1
package/message.d.ts
CHANGED
|
@@ -497,7 +497,7 @@ export interface MessageOriginChannel {
|
|
|
497
497
|
/** Date the message was sent originally in Unix time */
|
|
498
498
|
date: number;
|
|
499
499
|
/** Channel chat to which the message was originally sent */
|
|
500
|
-
chat: Chat;
|
|
500
|
+
chat: Chat.ChannelChat;
|
|
501
501
|
/** Unique message identifier inside the chat */
|
|
502
502
|
message_id: number;
|
|
503
503
|
/** Signature of the original post author */
|
package/methods.d.ts
CHANGED
|
@@ -94,6 +94,8 @@ export type ApiMethods<F> = {
|
|
|
94
94
|
reply_parameters?: ReplyParameters;
|
|
95
95
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
96
96
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
97
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
98
|
+
reply_to_message_id?: number;
|
|
97
99
|
}): Message.TextMessage;
|
|
98
100
|
/** 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. */
|
|
99
101
|
forwardMessage(args: {
|
|
@@ -149,6 +151,8 @@ export type ApiMethods<F> = {
|
|
|
149
151
|
reply_parameters?: ReplyParameters;
|
|
150
152
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
151
153
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
154
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
155
|
+
reply_to_message_id?: number;
|
|
152
156
|
}): MessageId;
|
|
153
157
|
/** 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. */
|
|
154
158
|
copyMessages(args: {
|
|
@@ -191,6 +195,8 @@ export type ApiMethods<F> = {
|
|
|
191
195
|
reply_parameters?: ReplyParameters;
|
|
192
196
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
193
197
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
198
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
199
|
+
reply_to_message_id?: number;
|
|
194
200
|
}): Message.PhotoMessage;
|
|
195
201
|
/** 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.
|
|
196
202
|
|
|
@@ -224,6 +230,8 @@ export type ApiMethods<F> = {
|
|
|
224
230
|
reply_parameters?: ReplyParameters;
|
|
225
231
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
226
232
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
233
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
234
|
+
reply_to_message_id?: number;
|
|
227
235
|
}): Message.AudioMessage;
|
|
228
236
|
/** 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. */
|
|
229
237
|
sendDocument(args: {
|
|
@@ -251,6 +259,8 @@ export type ApiMethods<F> = {
|
|
|
251
259
|
reply_parameters?: ReplyParameters;
|
|
252
260
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
253
261
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
262
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
263
|
+
reply_to_message_id?: number;
|
|
254
264
|
}): Message.DocumentMessage;
|
|
255
265
|
/** Use this method to send video files, Telegram clients support MPEG4 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. */
|
|
256
266
|
sendVideo(args: {
|
|
@@ -286,6 +296,8 @@ export type ApiMethods<F> = {
|
|
|
286
296
|
reply_parameters?: ReplyParameters;
|
|
287
297
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
288
298
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
299
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
300
|
+
reply_to_message_id?: number;
|
|
289
301
|
}): Message.VideoMessage;
|
|
290
302
|
/** 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. */
|
|
291
303
|
sendAnimation(args: {
|
|
@@ -319,6 +331,8 @@ export type ApiMethods<F> = {
|
|
|
319
331
|
reply_parameters?: ReplyParameters;
|
|
320
332
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
321
333
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
334
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
335
|
+
reply_to_message_id?: number;
|
|
322
336
|
}): Message.AnimationMessage;
|
|
323
337
|
/** 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. */
|
|
324
338
|
sendVoice(args: {
|
|
@@ -344,6 +358,8 @@ export type ApiMethods<F> = {
|
|
|
344
358
|
reply_parameters?: ReplyParameters;
|
|
345
359
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
346
360
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
361
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
362
|
+
reply_to_message_id?: number;
|
|
347
363
|
}): Message.VoiceMessage;
|
|
348
364
|
/** Use this method to send video messages. On success, the sent Message is returned.
|
|
349
365
|
As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. */
|
|
@@ -368,6 +384,8 @@ export type ApiMethods<F> = {
|
|
|
368
384
|
reply_parameters?: ReplyParameters;
|
|
369
385
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
370
386
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
387
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
388
|
+
reply_to_message_id?: number;
|
|
371
389
|
}): Message.VideoNoteMessage;
|
|
372
390
|
/** 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. */
|
|
373
391
|
sendMediaGroup(args: {
|
|
@@ -383,6 +401,8 @@ export type ApiMethods<F> = {
|
|
|
383
401
|
protect_content?: boolean;
|
|
384
402
|
/** Description of the message to reply to */
|
|
385
403
|
reply_parameters?: ReplyParameters;
|
|
404
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
405
|
+
reply_to_message_id?: number;
|
|
386
406
|
}): Array<Message.AudioMessage | Message.DocumentMessage | Message.PhotoMessage | Message.VideoMessage>;
|
|
387
407
|
/** Use this method to send point on the map. On success, the sent Message is returned. */
|
|
388
408
|
sendLocation(args: {
|
|
@@ -410,6 +430,8 @@ export type ApiMethods<F> = {
|
|
|
410
430
|
reply_parameters?: ReplyParameters;
|
|
411
431
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
412
432
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
433
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
434
|
+
reply_to_message_id?: number;
|
|
413
435
|
}): Message.LocationMessage;
|
|
414
436
|
/** 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. */
|
|
415
437
|
editMessageLiveLocation(args: {
|
|
@@ -473,6 +495,8 @@ export type ApiMethods<F> = {
|
|
|
473
495
|
reply_parameters?: ReplyParameters;
|
|
474
496
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
475
497
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
498
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
499
|
+
reply_to_message_id?: number;
|
|
476
500
|
}): Message.VenueMessage;
|
|
477
501
|
/** Use this method to send phone contacts. On success, the sent Message is returned. */
|
|
478
502
|
sendContact(args: {
|
|
@@ -496,6 +520,8 @@ export type ApiMethods<F> = {
|
|
|
496
520
|
reply_parameters?: ReplyParameters;
|
|
497
521
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user. */
|
|
498
522
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
523
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
524
|
+
reply_to_message_id?: number;
|
|
499
525
|
}): Message.ContactMessage;
|
|
500
526
|
/** Use this method to send a native poll. On success, the sent Message is returned. */
|
|
501
527
|
sendPoll(args: {
|
|
@@ -535,6 +561,8 @@ export type ApiMethods<F> = {
|
|
|
535
561
|
reply_parameters?: ReplyParameters;
|
|
536
562
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
537
563
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
564
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
565
|
+
reply_to_message_id?: number;
|
|
538
566
|
}): Message.PollMessage;
|
|
539
567
|
/** Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned. */
|
|
540
568
|
sendDice(args: {
|
|
@@ -552,6 +580,8 @@ export type ApiMethods<F> = {
|
|
|
552
580
|
reply_parameters?: ReplyParameters;
|
|
553
581
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
554
582
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
583
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
584
|
+
reply_to_message_id?: number;
|
|
555
585
|
}): Message.DiceMessage;
|
|
556
586
|
/** 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.
|
|
557
587
|
|
|
@@ -1144,6 +1174,8 @@ export type ApiMethods<F> = {
|
|
|
1144
1174
|
reply_parameters?: ReplyParameters;
|
|
1145
1175
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1146
1176
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1177
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
1178
|
+
reply_to_message_id?: number;
|
|
1147
1179
|
}): Message.StickerMessage;
|
|
1148
1180
|
/** Use this method to get a sticker set. On success, a StickerSet object is returned. */
|
|
1149
1181
|
getStickerSet(args: {
|
|
@@ -1332,6 +1364,8 @@ export type ApiMethods<F> = {
|
|
|
1332
1364
|
reply_parameters?: ReplyParameters;
|
|
1333
1365
|
/** An object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button. */
|
|
1334
1366
|
reply_markup?: InlineKeyboardMarkup;
|
|
1367
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
1368
|
+
reply_to_message_id?: number;
|
|
1335
1369
|
}): Message.InvoiceMessage;
|
|
1336
1370
|
/** Use this method to create a link for an invoice. Returns the created invoice link as String on success. */
|
|
1337
1371
|
createInvoiceLink(args: {
|
|
@@ -1421,6 +1455,8 @@ export type ApiMethods<F> = {
|
|
|
1421
1455
|
reply_parameters?: ReplyParameters;
|
|
1422
1456
|
/** An object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. */
|
|
1423
1457
|
reply_markup?: InlineKeyboardMarkup;
|
|
1458
|
+
/** @deprecated Use `reply_parameters` instead. */
|
|
1459
|
+
reply_to_message_id?: number;
|
|
1424
1460
|
}): Message.GameMessage;
|
|
1425
1461
|
/** 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 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. */
|
|
1426
1462
|
setGameScore(args: {
|