@grammyjs/types 2.5.1 → 2.6.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 KnorpelSenf
3
+ Copyright (c) 2022 KnorpelSenf
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/message.d.ts CHANGED
@@ -262,7 +262,7 @@ To use this mode, pass *HTML* in the *parse_mode* field. The following tags are
262
262
  <i>italic</i>, <em>italic</em>
263
263
  <u>underline</u>, <ins>underline</ins>
264
264
  <s>strikethrough</s>, <strike>strikethrough</strike>, <del>strikethrough</del>
265
- <span class="tg-spoiler">spoiler</span>
265
+ <span class="tg-spoiler">spoiler</span>, <tg-spoiler>spoiler</tg-spoiler>
266
266
  <b>bold <i>italic bold <s>italic bold strikethrough <span class="tg-spoiler">italic bold strikethrough spoiler</span></s> <u>underline italic bold</u></i> bold</b>
267
267
  <a href="http://www.example.com/">inline URL</a>
268
268
  <a href="tg://user?id=123456789">inline mention of a user</a>
@@ -631,6 +631,8 @@ export interface Sticker {
631
631
  height: number;
632
632
  /** True, if the sticker is animated */
633
633
  is_animated: boolean;
634
+ /** True, if the sticker is a video sticker */
635
+ is_video: boolean;
634
636
  /** Sticker thumbnail in the .WEBP or .JPG format */
635
637
  thumb?: PhotoSize;
636
638
  /** Emoji associated with the sticker */
@@ -651,11 +653,13 @@ export interface StickerSet {
651
653
  title: string;
652
654
  /** True, if the sticker set contains animated stickers */
653
655
  is_animated: boolean;
656
+ /** True, if the sticker set contains video stickers */
657
+ is_video: boolean;
654
658
  /** True, if the sticker set contains masks */
655
659
  contains_masks: boolean;
656
660
  /** List of all set stickers */
657
661
  stickers: Sticker[];
658
- /** Sticker set thumbnail in the .WEBP or .TGS format */
662
+ /** Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */
659
663
  thumb?: PhotoSize;
660
664
  }
661
665
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grammyjs/types",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "description": "Telegram Bot API type declarations for grammY",
5
5
  "main": "index.js",
6
6
  "repository": {
package/proxied.d.ts CHANGED
@@ -694,7 +694,7 @@ export interface InputFileProxy<F> {
694
694
 
695
695
  /** Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success. */
696
696
  unbanChatMember(args: {
697
- /** Unique identifier for the target group or username of the target supergroup or channel (in the format @username) */
697
+ /** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
698
698
  chat_id: number | string;
699
699
  /** Unique identifier of the target user */
700
700
  user_id: number;
@@ -1084,7 +1084,7 @@ export interface InputFileProxy<F> {
1084
1084
  message_id: number;
1085
1085
  }): true;
1086
1086
 
1087
- /** Use this method to send static .WEBP or animated .TGS stickers. On success, the sent Message is returned. */
1087
+ /** Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned. */
1088
1088
  sendSticker(args: {
1089
1089
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1090
1090
  chat_id: number | string;
@@ -1120,7 +1120,7 @@ export interface InputFileProxy<F> {
1120
1120
  png_sticker: F;
1121
1121
  }): File;
1122
1122
 
1123
- /** Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker or tgs_sticker. Returns True on success. */
1123
+ /** Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Returns True on success. */
1124
1124
  createNewStickerSet(args: {
1125
1125
  /** User identifier of created sticker set owner */
1126
1126
  user_id: number;
@@ -1130,8 +1130,10 @@ export interface InputFileProxy<F> {
1130
1130
  title: string;
1131
1131
  /** PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
1132
1132
  png_sticker?: F | string;
1133
- /** TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements */
1133
+ /** TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements */
1134
1134
  tgs_sticker?: F;
1135
+ /** WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements */
1136
+ webm_sticker?: F;
1135
1137
  /** One or more emoji corresponding to the sticker */
1136
1138
  emojis: string;
1137
1139
  /** Pass True, if a set of mask stickers should be created */
@@ -1140,7 +1142,7 @@ export interface InputFileProxy<F> {
1140
1142
  mask_position?: MaskPosition;
1141
1143
  }): true;
1142
1144
 
1143
- /** Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker or tgs_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success. */
1145
+ /** Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success. */
1144
1146
  addStickerToSet(args: {
1145
1147
  /** User identifier of sticker set owner */
1146
1148
  user_id: number;
@@ -1148,8 +1150,10 @@ export interface InputFileProxy<F> {
1148
1150
  name: string;
1149
1151
  /** PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
1150
1152
  png_sticker?: F | string;
1151
- /** TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements */
1153
+ /** TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements */
1152
1154
  tgs_sticker?: F;
1155
+ /** WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements */
1156
+ webm_sticker?: F;
1153
1157
  /** One or more emoji corresponding to the sticker */
1154
1158
  emojis: string;
1155
1159
  /** An object for position where the mask should be placed on faces */
@@ -1170,14 +1174,14 @@ export interface InputFileProxy<F> {
1170
1174
  sticker: string;
1171
1175
  }): true;
1172
1176
 
1173
- /** Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns True on success. */
1177
+ /** Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success. */
1174
1178
  setStickerSetThumb(args: {
1175
1179
  /** Sticker set name */
1176
1180
  name: string;
1177
1181
  /** User identifier of the sticker set owner */
1178
1182
  user_id: number;
1179
- /** A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/animated_stickers#technical-requirements for animated sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.. Animated sticker set thumbnail can't be uploaded via HTTP URL. */
1180
- thumb: F | string;
1183
+ /** A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements, or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files ». Animated sticker set thumbnails can't be uploaded via HTTP URL. */
1184
+ thumb?: F | string;
1181
1185
  }): true;
1182
1186
 
1183
1187
  /** Use this method to send answers to an inline query. On success, True is returned.