@@ -103,6 +103,12 @@ TelegramBot
103
103
* [ .setMyCommands(commands, [ options] )] ( #TelegramBot+setMyCommands ) ⇒ <code >Promise</code >
104
104
* [ .deleteMyCommands([ options] )] ( #TelegramBot+deleteMyCommands ) ⇒ <code >Promise</code >
105
105
* [ .getMyCommands([ options] )] ( #TelegramBot+getMyCommands ) ⇒ <code >Promise</code >
106
+ * [ .setMyName([ options] )] ( #TelegramBot+setMyName ) ⇒ <code >Promise</code >
107
+ * [ .getMyName([ options] )] ( #TelegramBot+getMyName ) ⇒ <code >Promise</code >
108
+ * [ .setMyDescription([ options] )] ( #TelegramBot+setMyDescription ) ⇒ <code >Promise</code >
109
+ * [ .getMyDescription([ options] )] ( #TelegramBot+getMyDescription ) ⇒ <code >Promise</code >
110
+ * [ .setMyShortDescription([ options] )] ( #TelegramBot+setMyShortDescription ) ⇒ <code >Promise</code >
111
+ * [ .getMyShortDescription([ options] )] ( #TelegramBot+getMyShortDescription ) ⇒ <code >Promise</code >
106
112
* [ .setChatMenuButton([ options] )] ( #TelegramBot+setChatMenuButton ) ⇒ <code >Promise</code >
107
113
* [ .getChatMenuButton([ options] )] ( #TelegramBot+getChatMenuButton ) ⇒ <code >Promise</code >
108
114
* [ .setMyDefaultAdministratorRights([ options] )] ( #TelegramBot+setMyDefaultAdministratorRights ) ⇒ <code >Promise</code >
@@ -116,12 +122,18 @@ TelegramBot
116
122
* [ .sendSticker(chatId, sticker, [ options] , [ fileOptions] )] ( #TelegramBot+sendSticker ) ⇒ <code >Promise</code >
117
123
* [ .getStickerSet(name, [ options] )] ( #TelegramBot+getStickerSet ) ⇒ <code >Promise</code >
118
124
* [ .getCustomEmojiStickers(custom_emoji_ids, [ options] )] ( #TelegramBot+getCustomEmojiStickers ) ⇒ <code >Promise</code >
119
- * [ .uploadStickerFile(userId, pngSticker , [ options] , [ fileOptions] )] ( #TelegramBot+uploadStickerFile ) ⇒ <code >Promise</code >
125
+ * [ .uploadStickerFile(userId, sticker, stickerFormat , [ options] , [ fileOptions] )] ( #TelegramBot+uploadStickerFile ) ⇒ <code >Promise</code >
120
126
* [ .createNewStickerSet(userId, name, title, pngSticker, emojis, [ options] , [ fileOptions] )] ( #TelegramBot+createNewStickerSet ) ⇒ <code >Promise</code >
121
127
* [ .addStickerToSet(userId, name, sticker, emojis, stickerType, [ options] , [ fileOptions] )] ( #TelegramBot+addStickerToSet ) ⇒ <code >Promise</code >
122
128
* [ .setStickerPositionInSet(sticker, position, [ options] )] ( #TelegramBot+setStickerPositionInSet ) ⇒ <code >Promise</code >
123
129
* [ .deleteStickerFromSet(sticker, [ options] )] ( #TelegramBot+deleteStickerFromSet ) ⇒ <code >Promise</code >
124
- * [ .setStickerSetThumb(userId, name, pngThumb, [ options] , [ fileOptions] )] ( #TelegramBot+setStickerSetThumb ) ⇒ <code >Promise</code >
130
+ * [ .setStickerEmojiList(sticker, emojiList, [ options] )] ( #TelegramBot+setStickerEmojiList ) ⇒ <code >Promise</code >
131
+ * [ .setStickerKeywords(sticker, [ options] )] ( #TelegramBot+setStickerKeywords ) ⇒ <code >Promise</code >
132
+ * [ .setStickerMaskPosition(sticker, [ options] )] ( #TelegramBot+setStickerMaskPosition ) ⇒ <code >Promise</code >
133
+ * [ .setStickerSetTitle(name, title, [ options] )] ( #TelegramBot+setStickerSetTitle ) ⇒ <code >Promise</code >
134
+ * [ .setStickerSetThumbnail(userId, name, thumbnail, [ options] , [ fileOptions] )] ( #TelegramBot+setStickerSetThumbnail ) ⇒ <code >Promise</code >
135
+ * [ .setCustomEmojiStickerSetThumbnail(name, [ options] )] ( #TelegramBot+setCustomEmojiStickerSetThumbnail ) ⇒ <code >Promise</code >
136
+ * [ .deleteStickerSet(name, [ options] )] ( #TelegramBot+deleteStickerSet ) ⇒ <code >Promise</code >
125
137
* [ .answerInlineQuery(inlineQueryId, results, [ options] )] ( #TelegramBot+answerInlineQuery ) ⇒ <code >Promise</code >
126
138
* [ .answerWebAppQuery(webAppQueryId, result, [ options] )] ( #TelegramBot+answerWebAppQuery ) ⇒ <code >Promise</code >
127
139
* [ .sendInvoice(chatId, title, description, payload, providerToken, currency, prices, [ options] )] ( #TelegramBot+sendInvoice ) ⇒ <code >Promise</code >
@@ -1632,6 +1644,87 @@ Use this method to get the current list of the bot's commands for the given scop
1632
1644
| --- | --- | --- |
1633
1645
| [ options] | <code >Object</code > | Additional Telegram query options |
1634
1646
1647
+ <a name =" TelegramBot+setMyName " ></a >
1648
+
1649
+ ### telegramBot.setMyName([ options] ) ⇒ <code >Promise</code >
1650
+ Use this method to change the bot's name.
1651
+
1652
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
1653
+ ** Returns** : <code >Promise</code > - True on success
1654
+ ** See** : https://core.telegram.org/bots/api#setmyname
1655
+
1656
+ | Param | Type | Description |
1657
+ | --- | --- | --- |
1658
+ | [ options] | <code >Object</code > | Additional Telegram query options |
1659
+
1660
+ <a name =" TelegramBot+getMyName " ></a >
1661
+
1662
+ ### telegramBot.getMyName([ options] ) ⇒ <code >Promise</code >
1663
+ Use this method to get the current bot name for the given user language.
1664
+
1665
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
1666
+ ** Returns** : <code >Promise</code > - [ BotName] ( https://core.telegram.org/bots/api#botname ) on success
1667
+ ** See** : https://core.telegram.org/bots/api#getmyname
1668
+
1669
+ | Param | Type | Description |
1670
+ | --- | --- | --- |
1671
+ | [ options] | <code >Object</code > | Additional Telegram query options |
1672
+
1673
+ <a name =" TelegramBot+setMyDescription " ></a >
1674
+
1675
+ ### telegramBot.setMyDescription([ options] ) ⇒ <code >Promise</code >
1676
+ Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty.
1677
+
1678
+ Returns True on success.
1679
+
1680
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
1681
+ ** Returns** : <code >Promise</code > - True on success
1682
+ ** See** : https://core.telegram.org/bots/api#setmydescription
1683
+
1684
+ | Param | Type | Description |
1685
+ | --- | --- | --- |
1686
+ | [ options] | <code >Object</code > | Additional Telegram query options |
1687
+
1688
+ <a name =" TelegramBot+getMyDescription " ></a >
1689
+
1690
+ ### telegramBot.getMyDescription([ options] ) ⇒ <code >Promise</code >
1691
+ Use this method to get the current bot description for the given user language.
1692
+
1693
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
1694
+ ** Returns** : <code >Promise</code > - Returns [ BotDescription] ( https://core.telegram.org/bots/api#botdescription ) on success.
1695
+ ** See** : https://core.telegram.org/bots/api#getmydescription
1696
+
1697
+ | Param | Type | Description |
1698
+ | --- | --- | --- |
1699
+ | [ options] | <code >Object</code > | Additional Telegram query options |
1700
+
1701
+ <a name =" TelegramBot+setMyShortDescription " ></a >
1702
+
1703
+ ### telegramBot.setMyShortDescription([ options] ) ⇒ <code >Promise</code >
1704
+ Use this method to change the bot's short description, which is shown on the bot's profile page
1705
+ and is sent together with the link when users share the bot.
1706
+
1707
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
1708
+ ** Returns** : <code >Promise</code > - Returns True on success.
1709
+ ** See** : https://core.telegram.org/bots/api#setmyshortdescription
1710
+
1711
+ | Param | Type | Description |
1712
+ | --- | --- | --- |
1713
+ | [ options] | <code >Object</code > | Additional Telegram query options |
1714
+
1715
+ <a name =" TelegramBot+getMyShortDescription " ></a >
1716
+
1717
+ ### telegramBot.getMyShortDescription([ options] ) ⇒ <code >Promise</code >
1718
+ Use this method to get the current bot short description for the given user language.
1719
+
1720
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
1721
+ ** Returns** : <code >Promise</code > - Returns [ BotShortDescription] ( https://core.telegram.org/bots/api#botshortdescription ) on success.
1722
+ ** See** : https://core.telegram.org/bots/api#getmyshortdescription
1723
+
1724
+ | Param | Type | Description |
1725
+ | --- | --- | --- |
1726
+ | [ options] | <code >Object</code > | Additional Telegram query options |
1727
+
1635
1728
<a name =" TelegramBot+setChatMenuButton " ></a >
1636
1729
1637
1730
### telegramBot.setChatMenuButton([ options] ) ⇒ <code >Promise</code >
@@ -1839,20 +1932,21 @@ Use this method to get information about custom emoji stickers by their identifi
1839
1932
1840
1933
<a name =" TelegramBot+uploadStickerFile " ></a >
1841
1934
1842
- ### telegramBot.uploadStickerFile(userId, pngSticker , [ options] , [ fileOptions] ) ⇒ <code >Promise</code >
1843
- Use this method to upload a .png file with a sticker for later use in * createNewStickerSet* and * addStickerToSet* methods (can be used multiple
1935
+ ### telegramBot.uploadStickerFile(userId, sticker, stickerFormat , [ options] , [ fileOptions] ) ⇒ <code >Promise</code >
1936
+ Use this method to upload a file with a sticker for later use in * createNewStickerSet* and * addStickerToSet* methods (can be used multiple
1844
1937
times).
1845
1938
1846
1939
** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
1847
1940
** Returns** : <code >Promise</code > - On success, a [ File] ( https://core.telegram.org/bots/api#file ) object is returned
1848
1941
** See** : https://core.telegram.org/bots/api#uploadstickerfile
1849
1942
1850
- | Param | Type | Description |
1851
- | --- | --- | --- |
1852
- | userId | <code >Number</code > | User identifier of sticker file owner |
1853
- | pngSticker | <code >String</code > \| <code >stream.Stream</code > \| <code >Buffer</code > | A file path or a Stream. Can also be a ` file_id ` previously uploaded. ** 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. |
1854
- | [ options] | <code >Object</code > | Additional Telegram query options |
1855
- | [ fileOptions] | <code >Object</code > | Optional file related meta-data |
1943
+ | Param | Type | Default | Description |
1944
+ | --- | --- | --- | --- |
1945
+ | userId | <code >Number</code > | | User identifier of sticker file owner |
1946
+ | sticker | <code >String</code > \| <code >stream.Stream</code > \| <code >Buffer</code > | | A file path or a Stream with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. Can also be a ` file_id ` previously uploaded. |
1947
+ | stickerFormat | <code >String</code > | <code >static</code > | Allow values: ` static ` , ` animated ` or ` video ` |
1948
+ | [ options] | <code >Object</code > | | Additional Telegram query options |
1949
+ | [ fileOptions] | <code >Object</code > | | Optional file related meta-data |
1856
1950
1857
1951
<a name =" TelegramBot+createNewStickerSet " ></a >
1858
1952
@@ -1935,25 +2029,123 @@ Use this method to delete a sticker from a set created by the bot.
1935
2029
| sticker | <code >String</code > | File identifier of the sticker |
1936
2030
| [ options] | <code >Object</code > | Additional Telegram query options |
1937
2031
1938
- <a name =" TelegramBot+setStickerSetThumb " ></a >
2032
+ <a name =" TelegramBot+setStickerEmojiList " ></a >
2033
+
2034
+ ### telegramBot.setStickerEmojiList(sticker, emojiList, [ options] ) ⇒ <code >Promise</code >
2035
+ Use this method to change the list of emoji assigned to a regular or custom emoji sticker.
2036
+
2037
+ The sticker must belong to a sticker set created by the bot.
2038
+
2039
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
2040
+ ** Returns** : <code >Promise</code > - True on success
2041
+ ** See** : https://core.telegram.org/bots/api#setstickeremojilist
2042
+
2043
+ | Param | Type | Description |
2044
+ | --- | --- | --- |
2045
+ | sticker | <code >String</code > | File identifier of the sticker |
2046
+ | emojiList | <code >Array</code > | A JSON-serialized list of 1-20 emoji associated with the sticker |
2047
+ | [ options] | <code >Object</code > | Additional Telegram query options |
2048
+
2049
+ <a name =" TelegramBot+setStickerKeywords " ></a >
2050
+
2051
+ ### telegramBot.setStickerKeywords(sticker, [ options] ) ⇒ <code >Promise</code >
2052
+ Use this method to change the list of emoji assigned to a ` regular ` or ` custom emoji ` sticker.
2053
+
2054
+ The sticker must belong to a sticker set created by the bot.
2055
+
2056
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
2057
+ ** Returns** : <code >Promise</code > - True on success
2058
+ ** See** : https://core.telegram.org/bots/api#setstickerkeywords
2059
+
2060
+ | Param | Type | Description |
2061
+ | --- | --- | --- |
2062
+ | sticker | <code >String</code > | File identifier of the sticker |
2063
+ | [ options] | <code >Object</code > | Additional Telegram query options |
2064
+
2065
+ <a name =" TelegramBot+setStickerMaskPosition " ></a >
2066
+
2067
+ ### telegramBot.setStickerMaskPosition(sticker, [ options] ) ⇒ <code >Promise</code >
2068
+ Use this method to change the [ mask position] ( https://core.telegram.org/bots/api#maskposition ) of a mask sticker.
2069
+
2070
+ The sticker must belong to a sticker set created by the bot.
2071
+
2072
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
2073
+ ** Returns** : <code >Promise</code > - True on success
2074
+ ** See** : https://core.telegram.org/bots/api#setstickermaskposition
2075
+
2076
+ | Param | Type | Description |
2077
+ | --- | --- | --- |
2078
+ | sticker | <code >String</code > | File identifier of the sticker |
2079
+ | [ options] | <code >Object</code > | Additional Telegram query options |
2080
+
2081
+ <a name =" TelegramBot+setStickerSetTitle " ></a >
2082
+
2083
+ ### telegramBot.setStickerSetTitle(name, title, [ options] ) ⇒ <code >Promise</code >
2084
+ Use this method to set the title of a created sticker set.
1939
2085
1940
- ### telegramBot.setStickerSetThumb(userId, name, pngThumb, [ options] , [ fileOptions] ) ⇒ <code >Promise</code >
2086
+ The sticker must belong to a sticker set created by the bot.
2087
+
2088
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
2089
+ ** Returns** : <code >Promise</code > - True on success
2090
+ ** See** : https://core.telegram.org/bots/api#setstickersettitle
2091
+
2092
+ | Param | Type | Description |
2093
+ | --- | --- | --- |
2094
+ | name | <code >String</code > | Sticker set name |
2095
+ | title | <code >String</code > | Sticker set title, 1-64 characters |
2096
+ | [ options] | <code >Object</code > | Additional Telegram query options |
2097
+
2098
+ <a name =" TelegramBot+setStickerSetThumbnail " ></a >
2099
+
2100
+ ### telegramBot.setStickerSetThumbnail(userId, name, thumbnail, [ options] , [ fileOptions] ) ⇒ <code >Promise</code >
1941
2101
Use this method to add a thumb to a set created by the bot.
1942
2102
1943
2103
Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only
1944
2104
1945
2105
** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
1946
2106
** Returns** : <code >Promise</code > - True on success
1947
- ** See** : https://core.telegram.org/bots/api#setstickersetthumb
2107
+ ** See** : https://core.telegram.org/bots/api#setstickersetthumbnail
1948
2108
1949
2109
| Param | Type | Description |
1950
2110
| --- | --- | --- |
1951
2111
| userId | <code >Number</code > | User identifier of sticker set owner |
1952
2112
| name | <code >String</code > | Sticker set name |
1953
- | pngThumb | <code >String</code > \| <code >stream.Stream</code > \| <code >Buffer</code > | A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, a TGS animation with the thumbnail up to 32 kilobytes in size or a WEBM video with the thumbnail up to 32 kilobytes in size. 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. Animated sticker set thumbnails can't be uploaded via HTTP URL. |
2113
+ | thumbnail | <code >String</code > \| <code >stream.Stream</code > \| <code >Buffer</code > | A .WEBP or . PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, a TGS animation with the thumbnail up to 32 kilobytes in size or a WEBM video with the thumbnail up to 32 kilobytes in size. 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. Animated sticker set thumbnails can't be uploaded via HTTP URL. |
1954
2114
| [ options] | <code >Object</code > | Additional Telegram query options |
1955
2115
| [ fileOptions] | <code >Object</code > | Optional file related meta-data |
1956
2116
2117
+ <a name =" TelegramBot+setCustomEmojiStickerSetThumbnail " ></a >
2118
+
2119
+ ### telegramBot.setCustomEmojiStickerSetThumbnail(name, [ options] ) ⇒ <code >Promise</code >
2120
+ Use this method to set the thumbnail of a custom emoji sticker set.
2121
+
2122
+ The sticker must belong to a sticker set created by the bot.
2123
+
2124
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
2125
+ ** Returns** : <code >Promise</code > - True on success
2126
+ ** See** : https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail
2127
+
2128
+ | Param | Type | Description |
2129
+ | --- | --- | --- |
2130
+ | name | <code >String</code > | Sticker set name |
2131
+ | [ options] | <code >Object</code > | Additional Telegram query options |
2132
+
2133
+ <a name =" TelegramBot+deleteStickerSet " ></a >
2134
+
2135
+ ### telegramBot.deleteStickerSet(name, [ options] ) ⇒ <code >Promise</code >
2136
+ Use this method to delete a sticker set that was created by the bot.
2137
+
2138
+ The sticker must belong to a sticker set created by the bot.
2139
+
2140
+ ** Kind** : instance method of [ <code >TelegramBot</code >] ( #TelegramBot )
2141
+ ** Returns** : <code >Promise</code > - True on success
2142
+ ** See** : https://core.telegram.org/bots/api#deletestickerset
2143
+
2144
+ | Param | Type | Description |
2145
+ | --- | --- | --- |
2146
+ | name | <code >String</code > | Sticker set name |
2147
+ | [ options] | <code >Object</code > | Additional Telegram query options |
2148
+
1957
2149
<a name =" TelegramBot+answerInlineQuery " ></a >
1958
2150
1959
2151
### telegramBot.answerInlineQuery(inlineQueryId, results, [ options] ) ⇒ <code >Promise</code >
0 commit comments