@mtkruto/node 0.66.8 → 0.66.9
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/esm/3_types.d.ts +3 -1
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +3 -1
- package/esm/client/0_params.d.ts +19 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +8 -12
- package/esm/client/3_message_manager.d.ts +2 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +32 -1
- package/esm/client/4_callback_query_manager.d.ts +1 -1
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +2 -2
- package/esm/client/4_inline_query_manager.d.ts +1 -1
- package/esm/client/4_inline_query_manager.js +2 -2
- package/esm/client/5_client.d.ts +124 -114
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +126 -114
- package/esm/types/{0_mini_app_info.d.ts → 0_mini_app_button_info.d.ts} +3 -4
- package/esm/types/0_mini_app_button_info.d.ts.map +1 -0
- package/esm/types/{0_mini_app_info.js → 0_mini_app_button_info.js} +1 -1
- package/esm/types/0_mini_app_mode.d.ts +22 -0
- package/esm/types/0_mini_app_mode.d.ts.map +1 -0
- package/esm/types/0_mini_app_mode.js +20 -0
- package/esm/types/1_inline_query_result_button.d.ts +2 -2
- package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.d.ts +2 -2
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_mini_app_info.d.ts +32 -0
- package/esm/types/1_mini_app_info.d.ts.map +1 -0
- package/esm/types/1_mini_app_info.js +27 -0
- package/esm/types/2_inline_keyboard_button.d.ts +2 -2
- package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/2_inline_keyboard_button.js +2 -2
- package/package.json +1 -1
- package/script/3_types.d.ts +3 -1
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +3 -1
- package/script/client/0_params.d.ts +19 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +8 -12
- package/script/client/3_message_manager.d.ts +2 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +31 -0
- package/script/client/4_callback_query_manager.d.ts +1 -1
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +2 -2
- package/script/client/4_inline_query_manager.d.ts +1 -1
- package/script/client/4_inline_query_manager.js +2 -2
- package/script/client/5_client.d.ts +124 -114
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +126 -114
- package/script/types/{0_mini_app_info.d.ts → 0_mini_app_button_info.d.ts} +3 -4
- package/script/types/0_mini_app_button_info.d.ts.map +1 -0
- package/script/types/{0_mini_app_info.js → 0_mini_app_button_info.js} +2 -2
- package/script/types/0_mini_app_mode.d.ts +22 -0
- package/script/types/0_mini_app_mode.d.ts.map +1 -0
- package/script/types/0_mini_app_mode.js +21 -0
- package/script/types/1_inline_query_result_button.d.ts +2 -2
- package/script/types/1_inline_query_result_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.d.ts +2 -2
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_mini_app_info.d.ts +32 -0
- package/script/types/1_mini_app_info.d.ts.map +1 -0
- package/script/types/1_mini_app_info.js +30 -0
- package/script/types/2_inline_keyboard_button.d.ts +2 -2
- package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/2_inline_keyboard_button.js +2 -2
- package/esm/types/0_mini_app_info.d.ts.map +0 -1
- package/script/types/0_mini_app_info.d.ts.map +0 -1
|
@@ -1081,7 +1081,7 @@ class Client extends Composer {
|
|
|
1081
1081
|
/**
|
|
1082
1082
|
* Get a chat's inputPeer. Useful when calling API functions directly.
|
|
1083
1083
|
*
|
|
1084
|
-
* @param id The identifier of
|
|
1084
|
+
* @param id The identifier of a chat.
|
|
1085
1085
|
*/
|
|
1086
1086
|
async getInputPeer(id) {
|
|
1087
1087
|
if (id === "me" || id == await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) {
|
|
@@ -1617,7 +1617,7 @@ class Client extends Composer {
|
|
|
1617
1617
|
* Send a text message.
|
|
1618
1618
|
*
|
|
1619
1619
|
* @method ms
|
|
1620
|
-
* @param chatId The chat to send the message to.
|
|
1620
|
+
* @param chatId The identifier of a chat to send the message to.
|
|
1621
1621
|
* @param text The message's text.
|
|
1622
1622
|
* @returns The sent text message.
|
|
1623
1623
|
*/
|
|
@@ -1628,7 +1628,7 @@ class Client extends Composer {
|
|
|
1628
1628
|
* Send a photo.
|
|
1629
1629
|
*
|
|
1630
1630
|
* @method ms
|
|
1631
|
-
* @param chatId The chat to send the photo to.
|
|
1631
|
+
* @param chatId The identifier of a chat to send the photo to.
|
|
1632
1632
|
* @param photo The photo to send.
|
|
1633
1633
|
* @returns The sent photo.
|
|
1634
1634
|
*/
|
|
@@ -1639,7 +1639,7 @@ class Client extends Composer {
|
|
|
1639
1639
|
* Send a document.
|
|
1640
1640
|
*
|
|
1641
1641
|
* @method ms
|
|
1642
|
-
* @param chatId The chat to send the document to.
|
|
1642
|
+
* @param chatId The identifier of a chat to send the document to.
|
|
1643
1643
|
* @param document The document to send.
|
|
1644
1644
|
* @returns The sent document.
|
|
1645
1645
|
*/
|
|
@@ -1650,7 +1650,7 @@ class Client extends Composer {
|
|
|
1650
1650
|
* Send a sticker.
|
|
1651
1651
|
*
|
|
1652
1652
|
* @method ms
|
|
1653
|
-
* @param chatId The chat to send the sticker to.
|
|
1653
|
+
* @param chatId The identifier of a chat to send the sticker to.
|
|
1654
1654
|
* @param document The sticker to send.
|
|
1655
1655
|
* @returns The sent sticker.
|
|
1656
1656
|
*/
|
|
@@ -1661,7 +1661,7 @@ class Client extends Composer {
|
|
|
1661
1661
|
* Send a video.
|
|
1662
1662
|
*
|
|
1663
1663
|
* @method ms
|
|
1664
|
-
* @param chatId The chat to send the video to.
|
|
1664
|
+
* @param chatId The identifier of a chat to send the video to.
|
|
1665
1665
|
* @param video The video to send.
|
|
1666
1666
|
* @returns The sent video.
|
|
1667
1667
|
*/
|
|
@@ -1672,7 +1672,7 @@ class Client extends Composer {
|
|
|
1672
1672
|
* Send an animation.
|
|
1673
1673
|
*
|
|
1674
1674
|
* @method ms
|
|
1675
|
-
* @param chatId The chat to send the animation to.
|
|
1675
|
+
* @param chatId The identifier of a chat to send the animation to.
|
|
1676
1676
|
* @param animation The animation to send.
|
|
1677
1677
|
* @returns The sent animation.
|
|
1678
1678
|
*/
|
|
@@ -1683,7 +1683,7 @@ class Client extends Composer {
|
|
|
1683
1683
|
* Send a voice message.
|
|
1684
1684
|
*
|
|
1685
1685
|
* @method ms
|
|
1686
|
-
* @param chatId The chat to send the voice message to.
|
|
1686
|
+
* @param chatId The identifier of a chat to send the voice message to.
|
|
1687
1687
|
* @param voice The voice to send.
|
|
1688
1688
|
* @returns The sent voice message.
|
|
1689
1689
|
*/
|
|
@@ -1694,7 +1694,7 @@ class Client extends Composer {
|
|
|
1694
1694
|
* Send an audio file.
|
|
1695
1695
|
*
|
|
1696
1696
|
* @method ms
|
|
1697
|
-
* @param chatId The chat to send the audio file to.
|
|
1697
|
+
* @param chatId The identifier of a chat to send the audio file to.
|
|
1698
1698
|
* @param audio The audio to send.
|
|
1699
1699
|
* @returns The sent audio filr.
|
|
1700
1700
|
*/
|
|
@@ -1705,7 +1705,7 @@ class Client extends Composer {
|
|
|
1705
1705
|
* Send a media group.
|
|
1706
1706
|
*
|
|
1707
1707
|
* @method ms
|
|
1708
|
-
* @param chatId The chat to send the media group to.
|
|
1708
|
+
* @param chatId The identifier of a chat to send the media group to.
|
|
1709
1709
|
* @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
|
|
1710
1710
|
* @returns The sent messages.
|
|
1711
1711
|
*/
|
|
@@ -1716,7 +1716,7 @@ class Client extends Composer {
|
|
|
1716
1716
|
* Send a video note.
|
|
1717
1717
|
*
|
|
1718
1718
|
* @method ms
|
|
1719
|
-
* @param chatId The chat to send the video note to.
|
|
1719
|
+
* @param chatId The identifier of a chat to send the video note to.
|
|
1720
1720
|
* @param videoNote The video note to send.
|
|
1721
1721
|
* @returns The sent video note.
|
|
1722
1722
|
*/
|
|
@@ -1727,7 +1727,7 @@ class Client extends Composer {
|
|
|
1727
1727
|
* Send a location.
|
|
1728
1728
|
*
|
|
1729
1729
|
* @method ms
|
|
1730
|
-
* @param chatId The chat to send the location to.
|
|
1730
|
+
* @param chatId The identifier of a chat to send the location to.
|
|
1731
1731
|
* @param latitude The location's latitude.
|
|
1732
1732
|
* @param longitude The location's longitude.
|
|
1733
1733
|
* @returns The sent location.
|
|
@@ -1739,7 +1739,7 @@ class Client extends Composer {
|
|
|
1739
1739
|
* Send a contact.
|
|
1740
1740
|
*
|
|
1741
1741
|
* @method ms
|
|
1742
|
-
* @param chatId The chat to send the contact to.
|
|
1742
|
+
* @param chatId The identifier of a chat to send the contact to.
|
|
1743
1743
|
* @param firstName The contact's first name.
|
|
1744
1744
|
* @param number The contact's phone number.
|
|
1745
1745
|
* @returns The sent contact.
|
|
@@ -1751,7 +1751,7 @@ class Client extends Composer {
|
|
|
1751
1751
|
* Send a dice.
|
|
1752
1752
|
*
|
|
1753
1753
|
* @method ms
|
|
1754
|
-
* @param chatId The chat to send the dice to.
|
|
1754
|
+
* @param chatId The identifier of a chat to send the dice to.
|
|
1755
1755
|
* @returns The sent dice.
|
|
1756
1756
|
*/
|
|
1757
1757
|
async sendDice(chatId, params) {
|
|
@@ -1761,7 +1761,7 @@ class Client extends Composer {
|
|
|
1761
1761
|
* Send a venue.
|
|
1762
1762
|
*
|
|
1763
1763
|
* @method ms
|
|
1764
|
-
* @param chatId The chat to send the venue to.
|
|
1764
|
+
* @param chatId The identifier of a chat to send the venue to.
|
|
1765
1765
|
* @param latitude The latitude of the venue.
|
|
1766
1766
|
* @param longitude The longitude of the venue.
|
|
1767
1767
|
* @param title The title of the venue.
|
|
@@ -1775,7 +1775,7 @@ class Client extends Composer {
|
|
|
1775
1775
|
* Send a poll.
|
|
1776
1776
|
*
|
|
1777
1777
|
* @method ms
|
|
1778
|
-
* @param chatId The chat to send the poll to.
|
|
1778
|
+
* @param chatId The identifier of a chat to send the poll to.
|
|
1779
1779
|
* @param question The poll's question.
|
|
1780
1780
|
* @param options The poll's options.
|
|
1781
1781
|
* @returns The sent poll.
|
|
@@ -1787,7 +1787,7 @@ class Client extends Composer {
|
|
|
1787
1787
|
* Send an invoice. Bot-only.
|
|
1788
1788
|
*
|
|
1789
1789
|
* @method ms
|
|
1790
|
-
* @param chatId The chat to send the invoice to.
|
|
1790
|
+
* @param chatId The identifier of a chat to send the invoice to.
|
|
1791
1791
|
* @param title The invoice's title.
|
|
1792
1792
|
* @param description The invoice's description.
|
|
1793
1793
|
* @param payload The invoice's payload.
|
|
@@ -1802,8 +1802,8 @@ class Client extends Composer {
|
|
|
1802
1802
|
* Edit a message's text.
|
|
1803
1803
|
*
|
|
1804
1804
|
* @method ms
|
|
1805
|
-
* @param chatId The identifier of the chat
|
|
1806
|
-
* @param messageId The message
|
|
1805
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
1806
|
+
* @param messageId The identifier of the message.
|
|
1807
1807
|
* @param text The new text of the message.
|
|
1808
1808
|
* @returns The edited text message.
|
|
1809
1809
|
*/
|
|
@@ -1814,8 +1814,8 @@ class Client extends Composer {
|
|
|
1814
1814
|
* Edit a message's caption.
|
|
1815
1815
|
*
|
|
1816
1816
|
* @method ms
|
|
1817
|
-
* @param chatId The identifier of the chat
|
|
1818
|
-
* @param messageId The message
|
|
1817
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
1818
|
+
* @param messageId The identifier of the message.
|
|
1819
1819
|
* @param text The new caption of the message.
|
|
1820
1820
|
* @returns The edited message.
|
|
1821
1821
|
*/
|
|
@@ -1826,8 +1826,8 @@ class Client extends Composer {
|
|
|
1826
1826
|
* Edit a message's media.
|
|
1827
1827
|
*
|
|
1828
1828
|
* @method ms
|
|
1829
|
-
* @param chatId The identifier of the chat
|
|
1830
|
-
* @param messageId The message
|
|
1829
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
1830
|
+
* @param messageId The identifier of the message.
|
|
1831
1831
|
* @param media The new media of the message.
|
|
1832
1832
|
* @returns The edited message.
|
|
1833
1833
|
*/
|
|
@@ -1838,7 +1838,7 @@ class Client extends Composer {
|
|
|
1838
1838
|
* Edit an inline message's media.
|
|
1839
1839
|
*
|
|
1840
1840
|
* @method ms
|
|
1841
|
-
* @param inlineMessageId The inline message
|
|
1841
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
1842
1842
|
* @param media The new media of the message.
|
|
1843
1843
|
*/
|
|
1844
1844
|
async editInlineMessageMedia(inlineMessageId, media, params) {
|
|
@@ -1848,7 +1848,7 @@ class Client extends Composer {
|
|
|
1848
1848
|
* Edit an inline message's text. Bot-only.
|
|
1849
1849
|
*
|
|
1850
1850
|
* @method ms
|
|
1851
|
-
* @param inlineMessageId The inline message
|
|
1851
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
1852
1852
|
* @param text The new text of the message.
|
|
1853
1853
|
*/
|
|
1854
1854
|
async editInlineMessageText(inlineMessageId, text, params) {
|
|
@@ -1858,7 +1858,7 @@ class Client extends Composer {
|
|
|
1858
1858
|
* Edit an inline message's caption. Bot-only.
|
|
1859
1859
|
*
|
|
1860
1860
|
* @method ms
|
|
1861
|
-
* @param inlineMessageId The inline message
|
|
1861
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
1862
1862
|
*/
|
|
1863
1863
|
async editInlineMessageCaption(inlineMessageId, params) {
|
|
1864
1864
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageCaption(inlineMessageId, params);
|
|
@@ -1867,8 +1867,8 @@ class Client extends Composer {
|
|
|
1867
1867
|
* Edit a message's reply markup.
|
|
1868
1868
|
*
|
|
1869
1869
|
* @method ms
|
|
1870
|
-
* @param chatId The identifier of the chat
|
|
1871
|
-
* @param messageId The message
|
|
1870
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
1871
|
+
* @param messageId The identifier of the message.
|
|
1872
1872
|
* @returns The edited message.
|
|
1873
1873
|
*/
|
|
1874
1874
|
async editMessageReplyMarkup(chatId, messageId, params) {
|
|
@@ -1878,7 +1878,7 @@ class Client extends Composer {
|
|
|
1878
1878
|
* Edit an inline message's reply markup. Bot-only.
|
|
1879
1879
|
*
|
|
1880
1880
|
* @method ms
|
|
1881
|
-
* @param inlineMessageId The inline message
|
|
1881
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
1882
1882
|
*/
|
|
1883
1883
|
async editInlineMessageReplyMarkup(inlineMessageId, params) {
|
|
1884
1884
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
@@ -1887,8 +1887,8 @@ class Client extends Composer {
|
|
|
1887
1887
|
* Edit a message's live location.
|
|
1888
1888
|
*
|
|
1889
1889
|
* @method ms
|
|
1890
|
-
* @param chatId The identifier of the chat
|
|
1891
|
-
* @param messageId The message
|
|
1890
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
1891
|
+
* @param messageId The identifier of the message.
|
|
1892
1892
|
* @param latitude The new latitude.
|
|
1893
1893
|
* @param longitude The new longitude.
|
|
1894
1894
|
* @returns The edited location message.
|
|
@@ -1900,7 +1900,7 @@ class Client extends Composer {
|
|
|
1900
1900
|
* Edit an inline message's live location. Bot-only.
|
|
1901
1901
|
*
|
|
1902
1902
|
* @method ms
|
|
1903
|
-
* @param inlineMessageId The inline message
|
|
1903
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
1904
1904
|
* @param latitude The new latitude.
|
|
1905
1905
|
* @param longitude The new longitude.
|
|
1906
1906
|
* @returns The edited location message.
|
|
@@ -1912,7 +1912,7 @@ class Client extends Composer {
|
|
|
1912
1912
|
* Retrieve multiple messages.
|
|
1913
1913
|
*
|
|
1914
1914
|
* @method ms
|
|
1915
|
-
* @param chatId The identifier of
|
|
1915
|
+
* @param chatId The identifier of a chat to retrieve the messages from.
|
|
1916
1916
|
* @param messageIds The identifiers of the messages to retrieve.
|
|
1917
1917
|
* @example ```ts
|
|
1918
1918
|
* const message = await client.getMessages("@MTKruto", [210, 212]);
|
|
@@ -1927,7 +1927,7 @@ class Client extends Composer {
|
|
|
1927
1927
|
* Retrieve a single message.
|
|
1928
1928
|
*
|
|
1929
1929
|
* @method ms
|
|
1930
|
-
* @param chatId The identifier of
|
|
1930
|
+
* @param chatId The identifier of a chat.
|
|
1931
1931
|
* @param messageId The identifier of the message to retrieve.
|
|
1932
1932
|
* @example ```ts
|
|
1933
1933
|
* const message = await client.getMessage("@MTKruto", 212);
|
|
@@ -1955,7 +1955,7 @@ class Client extends Composer {
|
|
|
1955
1955
|
* Delete multiple messages.
|
|
1956
1956
|
*
|
|
1957
1957
|
* @method ms
|
|
1958
|
-
* @param chatId The identifier of the chat
|
|
1958
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
1959
1959
|
* @param messageIds The identifiers of the messages to delete.
|
|
1960
1960
|
*/
|
|
1961
1961
|
async deleteMessages(chatId, messageIds, params) {
|
|
@@ -1965,7 +1965,7 @@ class Client extends Composer {
|
|
|
1965
1965
|
* Delete a single message.
|
|
1966
1966
|
*
|
|
1967
1967
|
* @method ms
|
|
1968
|
-
* @param chatId The identifier of the chat
|
|
1968
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
1969
1969
|
* @param messageId The identifier of the message to delete.
|
|
1970
1970
|
*/
|
|
1971
1971
|
async deleteMessage(chatId, messageId, params) {
|
|
@@ -1975,7 +1975,7 @@ class Client extends Composer {
|
|
|
1975
1975
|
* Delete all messages sent by a specific member of a chat. User-only.
|
|
1976
1976
|
*
|
|
1977
1977
|
* @method ms
|
|
1978
|
-
* @param chatId The identifier of
|
|
1978
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
1979
1979
|
* @param memberId The identifier of the member.
|
|
1980
1980
|
*/
|
|
1981
1981
|
async deleteChatMemberMessages(chatId, memberId) {
|
|
@@ -1985,7 +1985,7 @@ class Client extends Composer {
|
|
|
1985
1985
|
* Delete multiple scheduled messages.
|
|
1986
1986
|
*
|
|
1987
1987
|
* @method ms
|
|
1988
|
-
* @param chatId The identifier of
|
|
1988
|
+
* @param chatId The identifier of a chat.
|
|
1989
1989
|
* @param messageIds The identifiers of the scheduled messages to delete.
|
|
1990
1990
|
*/
|
|
1991
1991
|
async deleteScheduledMessages(chatId, messageIds) {
|
|
@@ -1995,7 +1995,7 @@ class Client extends Composer {
|
|
|
1995
1995
|
* Delete a scheduled message.
|
|
1996
1996
|
*
|
|
1997
1997
|
* @method ms
|
|
1998
|
-
* @param chatId The identifier of
|
|
1998
|
+
* @param chatId The identifier of a chat.
|
|
1999
1999
|
* @param messageId The identifier of the scheduled message to delete.
|
|
2000
2000
|
*/
|
|
2001
2001
|
async deleteScheduledMessage(chatId, messageId) {
|
|
@@ -2005,7 +2005,7 @@ class Client extends Composer {
|
|
|
2005
2005
|
* Send multiple scheduled messages before their schedule.
|
|
2006
2006
|
*
|
|
2007
2007
|
* @method ms
|
|
2008
|
-
* @param chatId The identifier of
|
|
2008
|
+
* @param chatId The identifier of a chat.
|
|
2009
2009
|
* @param messageIds The identifiers of the scheduled messages to send.
|
|
2010
2010
|
*/
|
|
2011
2011
|
async sendScheduledMessages(chatId, messageIds) {
|
|
@@ -2015,7 +2015,7 @@ class Client extends Composer {
|
|
|
2015
2015
|
* Send a scheduled message before its schedule.
|
|
2016
2016
|
*
|
|
2017
2017
|
* @method ms
|
|
2018
|
-
* @param chatId The identifier of
|
|
2018
|
+
* @param chatId The identifier of a chat.
|
|
2019
2019
|
* @param messageId The identifier of the scheduled message to send.
|
|
2020
2020
|
*/
|
|
2021
2021
|
async sendScheduledMessage(chatId, messageId) {
|
|
@@ -2025,8 +2025,8 @@ class Client extends Composer {
|
|
|
2025
2025
|
* Pin a message in a chat.
|
|
2026
2026
|
*
|
|
2027
2027
|
* @method ms
|
|
2028
|
-
* @param chatId The identifier of
|
|
2029
|
-
* @param messageId The message
|
|
2028
|
+
* @param chatId The identifier of a chat.
|
|
2029
|
+
* @param messageId The identifier of the message.
|
|
2030
2030
|
*/
|
|
2031
2031
|
async pinMessage(chatId, messageId, params) {
|
|
2032
2032
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").pinMessage(chatId, messageId, params);
|
|
@@ -2035,8 +2035,8 @@ class Client extends Composer {
|
|
|
2035
2035
|
* Unpin a pinned message.
|
|
2036
2036
|
*
|
|
2037
2037
|
* @method ms
|
|
2038
|
-
* @param chatId The identifier of
|
|
2039
|
-
* @param messageId The message
|
|
2038
|
+
* @param chatId The identifier of a chat.
|
|
2039
|
+
* @param messageId The identifier of the message.
|
|
2040
2040
|
*/
|
|
2041
2041
|
async unpinMessage(chatId, messageId, params) {
|
|
2042
2042
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").unpinMessage(chatId, messageId, params);
|
|
@@ -2045,7 +2045,7 @@ class Client extends Composer {
|
|
|
2045
2045
|
* Unpin all pinned messages.
|
|
2046
2046
|
*
|
|
2047
2047
|
* @method ms
|
|
2048
|
-
* @param chatId The identifier of
|
|
2048
|
+
* @param chatId The identifier of a chat.
|
|
2049
2049
|
*/
|
|
2050
2050
|
async unpinMessages(chatId) {
|
|
2051
2051
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").unpinMessages(chatId);
|
|
@@ -2054,8 +2054,8 @@ class Client extends Composer {
|
|
|
2054
2054
|
* Forward multiple messages.
|
|
2055
2055
|
*
|
|
2056
2056
|
* @method ms
|
|
2057
|
-
* @param from The identifier of
|
|
2058
|
-
* @param to The identifier of
|
|
2057
|
+
* @param from The identifier of a chat to forward the messages from.
|
|
2058
|
+
* @param to The identifier of a chat to forward the messages to.
|
|
2059
2059
|
* @param messageIds The identifiers of the messages to forward.
|
|
2060
2060
|
* @returns The forwarded messages.
|
|
2061
2061
|
*/
|
|
@@ -2066,8 +2066,8 @@ class Client extends Composer {
|
|
|
2066
2066
|
* Forward a single message.
|
|
2067
2067
|
*
|
|
2068
2068
|
* @method ms
|
|
2069
|
-
* @param from The identifier of
|
|
2070
|
-
* @param to The identifier of
|
|
2069
|
+
* @param from The identifier of a chat to forward the message from.
|
|
2070
|
+
* @param to The identifier of a chat to forward the message to.
|
|
2071
2071
|
* @param messageId The identifier of the message to forward.
|
|
2072
2072
|
* @returns The forwarded message.
|
|
2073
2073
|
*/
|
|
@@ -2089,7 +2089,7 @@ class Client extends Composer {
|
|
|
2089
2089
|
* Send a chat action.
|
|
2090
2090
|
*
|
|
2091
2091
|
* @method ms
|
|
2092
|
-
* @param chatId The chat to send the chat action to.
|
|
2092
|
+
* @param chatId The identifier of a chat to send the chat action to.
|
|
2093
2093
|
* @param action The chat action.
|
|
2094
2094
|
* @param messageThreadId The thread to send the chat action to.
|
|
2095
2095
|
*/
|
|
@@ -2100,7 +2100,7 @@ class Client extends Composer {
|
|
|
2100
2100
|
* Search the messages of a chat. User-only.
|
|
2101
2101
|
*
|
|
2102
2102
|
* @method ms
|
|
2103
|
-
* @param chatId The identifier of
|
|
2103
|
+
* @param chatId The identifier of a chat.
|
|
2104
2104
|
* @param query The message search query.
|
|
2105
2105
|
*/
|
|
2106
2106
|
async searchMessages(chatId, query, params) {
|
|
@@ -2110,8 +2110,8 @@ class Client extends Composer {
|
|
|
2110
2110
|
* Mark messages as read. User-only.
|
|
2111
2111
|
*
|
|
2112
2112
|
* @method ms
|
|
2113
|
-
* @param chatId The identifier of the chat
|
|
2114
|
-
* @param untilMessageId The identifier of
|
|
2113
|
+
* @param chatId The identifier of the chat which the messages belong to.
|
|
2114
|
+
* @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
|
|
2115
2115
|
*/
|
|
2116
2116
|
async readMessages(chatId, untilMessageId) {
|
|
2117
2117
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").readMessages(chatId, untilMessageId);
|
|
@@ -2130,7 +2130,7 @@ class Client extends Composer {
|
|
|
2130
2130
|
* Transcribe a voice message. User-only.
|
|
2131
2131
|
*
|
|
2132
2132
|
* @method ms
|
|
2133
|
-
* @param chatId The identifier of the chat
|
|
2133
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
2134
2134
|
* @param messageId The identifier of the message.
|
|
2135
2135
|
* @cache
|
|
2136
2136
|
*/
|
|
@@ -2146,6 +2146,17 @@ class Client extends Composer {
|
|
|
2146
2146
|
async getLinkPreview(text, params) {
|
|
2147
2147
|
return await __classPrivateFieldGet(this, _Client_linkPreviewManager, "f").getLinkPreview(text, params);
|
|
2148
2148
|
}
|
|
2149
|
+
/**
|
|
2150
|
+
* Open a mini app. User-only.
|
|
2151
|
+
*
|
|
2152
|
+
* @method ms
|
|
2153
|
+
* @param botId The identifier of a bot with the mini app.
|
|
2154
|
+
* @param chatId The identifier of the chat from which the mini app is opened.
|
|
2155
|
+
* @cache
|
|
2156
|
+
*/
|
|
2157
|
+
async openMiniApp(botId, chatId, params) {
|
|
2158
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").openMiniApp(botId, chatId, params);
|
|
2159
|
+
}
|
|
2149
2160
|
//
|
|
2150
2161
|
// ========================= POLLS ========================= //
|
|
2151
2162
|
//
|
|
@@ -2226,7 +2237,7 @@ class Client extends Composer {
|
|
|
2226
2237
|
* Get chat history. User-only.
|
|
2227
2238
|
*
|
|
2228
2239
|
* @method ch
|
|
2229
|
-
* @param chatId The identifier of
|
|
2240
|
+
* @param chatId The identifier of a chat.
|
|
2230
2241
|
*/
|
|
2231
2242
|
async getHistory(chatId, params) {
|
|
2232
2243
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").getHistory(chatId, params);
|
|
@@ -2235,7 +2246,7 @@ class Client extends Composer {
|
|
|
2235
2246
|
* Set a chat's available reactions. User-only.
|
|
2236
2247
|
*
|
|
2237
2248
|
* @method ch
|
|
2238
|
-
* @param chatId The identifier of
|
|
2249
|
+
* @param chatId The identifier of a chat.
|
|
2239
2250
|
* @param availableReactions The new available reactions.
|
|
2240
2251
|
*/
|
|
2241
2252
|
async setAvailableReactions(chatId, availableReactions) {
|
|
@@ -2245,7 +2256,7 @@ class Client extends Composer {
|
|
|
2245
2256
|
* Set a chat's photo.
|
|
2246
2257
|
*
|
|
2247
2258
|
* @method ch
|
|
2248
|
-
* @param chatId The identifier of
|
|
2259
|
+
* @param chatId The identifier of a chat.
|
|
2249
2260
|
* @param photo A photo to set as the chat's photo.
|
|
2250
2261
|
*/
|
|
2251
2262
|
async setChatPhoto(chatId, photo, params) {
|
|
@@ -2255,7 +2266,7 @@ class Client extends Composer {
|
|
|
2255
2266
|
* Delete a chat's photo.
|
|
2256
2267
|
*
|
|
2257
2268
|
* @method ch
|
|
2258
|
-
* @param chatId The identifier of
|
|
2269
|
+
* @param chatId The identifier of a chat.
|
|
2259
2270
|
*/
|
|
2260
2271
|
async deleteChatPhoto(chatId) {
|
|
2261
2272
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").deleteChatPhoto(chatId);
|
|
@@ -2264,7 +2275,7 @@ class Client extends Composer {
|
|
|
2264
2275
|
* Ban a member from a chat.
|
|
2265
2276
|
*
|
|
2266
2277
|
* @method ch
|
|
2267
|
-
* @param chatId The identifier of
|
|
2278
|
+
* @param chatId The identifier of a chat.
|
|
2268
2279
|
* @param memberId The identifier of the member.
|
|
2269
2280
|
*/
|
|
2270
2281
|
async banChatMember(chatId, memberId, params) {
|
|
@@ -2274,7 +2285,7 @@ class Client extends Composer {
|
|
|
2274
2285
|
* Unban a member from a chat.
|
|
2275
2286
|
*
|
|
2276
2287
|
* @method ch
|
|
2277
|
-
* @param chatId The identifier of
|
|
2288
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2278
2289
|
* @param memberId The identifier of the member.
|
|
2279
2290
|
*/
|
|
2280
2291
|
async unbanChatMember(chatId, memberId) {
|
|
@@ -2284,7 +2295,7 @@ class Client extends Composer {
|
|
|
2284
2295
|
* Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
|
|
2285
2296
|
*
|
|
2286
2297
|
* @method ch
|
|
2287
|
-
* @param chatId The identifier of
|
|
2298
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2288
2299
|
* @param memberId The identifier of the member.
|
|
2289
2300
|
*/
|
|
2290
2301
|
async kickChatMember(chatId, memberId) {
|
|
@@ -2295,8 +2306,8 @@ class Client extends Composer {
|
|
|
2295
2306
|
* Set the rights of a chat member.
|
|
2296
2307
|
*
|
|
2297
2308
|
* @method ch
|
|
2298
|
-
* @param chatId The identifier of
|
|
2299
|
-
* @param memberId The identifier of
|
|
2309
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2310
|
+
* @param memberId The identifier of the member.
|
|
2300
2311
|
*/
|
|
2301
2312
|
async setChatMemberRights(chatId, memberId, params) {
|
|
2302
2313
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").setChatMemberRights(chatId, memberId, params);
|
|
@@ -2305,7 +2316,7 @@ class Client extends Composer {
|
|
|
2305
2316
|
* Get the administrators of a chat.
|
|
2306
2317
|
*
|
|
2307
2318
|
* @method ch
|
|
2308
|
-
* @param chatId The identifier of
|
|
2319
|
+
* @param chatId The identifier of a chat.
|
|
2309
2320
|
* @returns The chat's administrators.
|
|
2310
2321
|
*/
|
|
2311
2322
|
async getChatAdministrators(chatId) {
|
|
@@ -2315,7 +2326,7 @@ class Client extends Composer {
|
|
|
2315
2326
|
* Enable join requests in a chat. User-only.
|
|
2316
2327
|
*
|
|
2317
2328
|
* @method ch
|
|
2318
|
-
* @param chatId The identifier of
|
|
2329
|
+
* @param chatId The identifier of a chat. Must be a channel or a supergroup.
|
|
2319
2330
|
*/
|
|
2320
2331
|
async enableJoinRequests(chatId) {
|
|
2321
2332
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").enableJoinRequests(chatId);
|
|
@@ -2324,7 +2335,7 @@ class Client extends Composer {
|
|
|
2324
2335
|
* Disable join requests in a chat. User-only.
|
|
2325
2336
|
*
|
|
2326
2337
|
* @method ch
|
|
2327
|
-
* @param chatId The identifier of
|
|
2338
|
+
* @param chatId The identifier of a chat. Must be a channel or a supergroup.
|
|
2328
2339
|
*/
|
|
2329
2340
|
async disableJoinRequests(chatId) {
|
|
2330
2341
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").disableJoinRequests(chatId);
|
|
@@ -2342,7 +2353,7 @@ class Client extends Composer {
|
|
|
2342
2353
|
* Get the invite links created for a chat. User-only.
|
|
2343
2354
|
*
|
|
2344
2355
|
* @method ch
|
|
2345
|
-
* @param chatId The identifier of
|
|
2356
|
+
* @param chatId The identifier of a chat.
|
|
2346
2357
|
* @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
|
|
2347
2358
|
*/
|
|
2348
2359
|
async getCreatedInviteLinks(chatId, params) {
|
|
@@ -2352,7 +2363,7 @@ class Client extends Composer {
|
|
|
2352
2363
|
* Join a chat. User-only.
|
|
2353
2364
|
*
|
|
2354
2365
|
* @method ch
|
|
2355
|
-
* @param chatId The identifier of
|
|
2366
|
+
* @param chatId The identifier of a chat.
|
|
2356
2367
|
*/
|
|
2357
2368
|
async joinChat(chatId) {
|
|
2358
2369
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").joinChat(chatId);
|
|
@@ -2361,7 +2372,7 @@ class Client extends Composer {
|
|
|
2361
2372
|
* Leave a chat.
|
|
2362
2373
|
*
|
|
2363
2374
|
* @method ch
|
|
2364
|
-
* @param chatId The identifier of
|
|
2375
|
+
* @param chatId The identifier of a chat.
|
|
2365
2376
|
*/
|
|
2366
2377
|
async leaveChat(chatId) {
|
|
2367
2378
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").leaveChat(chatId);
|
|
@@ -2370,7 +2381,7 @@ class Client extends Composer {
|
|
|
2370
2381
|
* Get information on a user's chat membership.
|
|
2371
2382
|
*
|
|
2372
2383
|
* @method ch
|
|
2373
|
-
* @param chatId The identifier of a chat
|
|
2384
|
+
* @param chatId The identifier of a chat.
|
|
2374
2385
|
* @param userId The identifier of the user.
|
|
2375
2386
|
*/
|
|
2376
2387
|
async getChatMember(chatId, userId) {
|
|
@@ -2380,7 +2391,7 @@ class Client extends Composer {
|
|
|
2380
2391
|
* Get the members of a chat.
|
|
2381
2392
|
*
|
|
2382
2393
|
* @method ch
|
|
2383
|
-
* @param chatId The
|
|
2394
|
+
* @param chatId The identifier of a chat.
|
|
2384
2395
|
*/
|
|
2385
2396
|
async getChatMembers(chatId, params) {
|
|
2386
2397
|
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChatMembers(chatId, params);
|
|
@@ -2389,7 +2400,7 @@ class Client extends Composer {
|
|
|
2389
2400
|
* Set a chat's sticker set.
|
|
2390
2401
|
*
|
|
2391
2402
|
* @method ch
|
|
2392
|
-
* @param chatId The identifier of
|
|
2403
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2393
2404
|
* @param setName The name of the set.
|
|
2394
2405
|
*/
|
|
2395
2406
|
async setChatStickerSet(chatId, setName) {
|
|
@@ -2399,7 +2410,7 @@ class Client extends Composer {
|
|
|
2399
2410
|
* Delete a chat's sticker set.
|
|
2400
2411
|
*
|
|
2401
2412
|
* @method ch
|
|
2402
|
-
* @param chatId The identifier of
|
|
2413
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2403
2414
|
*/
|
|
2404
2415
|
async deleteChatStickerSet(chatId) {
|
|
2405
2416
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatStickerSet(chatId);
|
|
@@ -2408,7 +2419,7 @@ class Client extends Composer {
|
|
|
2408
2419
|
* Set the number of boosts required to circument a chat's default restrictions. User-only.
|
|
2409
2420
|
*
|
|
2410
2421
|
* @method ch
|
|
2411
|
-
* @param chatId The identifier of
|
|
2422
|
+
* @param chatId The identifier of a chat.
|
|
2412
2423
|
* @param boosts The number of boosts required to circumvent its restrictions.
|
|
2413
2424
|
*/
|
|
2414
2425
|
async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
|
|
@@ -2418,7 +2429,7 @@ class Client extends Composer {
|
|
|
2418
2429
|
* Create an invite link.
|
|
2419
2430
|
*
|
|
2420
2431
|
* @method ch
|
|
2421
|
-
* @param chatId The identifier of
|
|
2432
|
+
* @param chatId The identifier of a chat to create the invite link for.
|
|
2422
2433
|
* @returns The newly created invite link.
|
|
2423
2434
|
*/
|
|
2424
2435
|
async createInviteLink(chatId, params) {
|
|
@@ -2428,7 +2439,7 @@ class Client extends Composer {
|
|
|
2428
2439
|
* Approve a join request.
|
|
2429
2440
|
*
|
|
2430
2441
|
* @method ch
|
|
2431
|
-
* @param chatId The identifier of
|
|
2442
|
+
* @param chatId The identifier of a chat with the join request.
|
|
2432
2443
|
* @param userId The user who made the join request.
|
|
2433
2444
|
*/
|
|
2434
2445
|
async approveJoinRequest(chatId, userId) {
|
|
@@ -2438,7 +2449,7 @@ class Client extends Composer {
|
|
|
2438
2449
|
* Decline a join request.
|
|
2439
2450
|
*
|
|
2440
2451
|
* @method ch
|
|
2441
|
-
* @param chatId The identifier of
|
|
2452
|
+
* @param chatId The identifier of a chat with the join request.
|
|
2442
2453
|
* @param userId The user who made the join request.
|
|
2443
2454
|
*/
|
|
2444
2455
|
async declineJoinRequest(chatId, userId) {
|
|
@@ -2448,7 +2459,7 @@ class Client extends Composer {
|
|
|
2448
2459
|
* Approve all join requests. User-only.
|
|
2449
2460
|
*
|
|
2450
2461
|
* @method ch
|
|
2451
|
-
* @param chatId The identifier of
|
|
2462
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
2452
2463
|
*/
|
|
2453
2464
|
async approveJoinRequests(chatId, params) {
|
|
2454
2465
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").approveJoinRequests(chatId, params);
|
|
@@ -2457,7 +2468,7 @@ class Client extends Composer {
|
|
|
2457
2468
|
* Decline all join requests. User-only.
|
|
2458
2469
|
*
|
|
2459
2470
|
* @method ch
|
|
2460
|
-
* @param chatId The identifier of
|
|
2471
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
2461
2472
|
*/
|
|
2462
2473
|
async declineJoinRequests(chatId, params) {
|
|
2463
2474
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").declineJoinRequests(chatId, params);
|
|
@@ -2466,7 +2477,7 @@ class Client extends Composer {
|
|
|
2466
2477
|
* Get pending join requests in a chat. User-only.
|
|
2467
2478
|
*
|
|
2468
2479
|
* @method ch
|
|
2469
|
-
* @param chatId The identifier of
|
|
2480
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
2470
2481
|
*/
|
|
2471
2482
|
async getJoinRequests(chatId, params) {
|
|
2472
2483
|
return await __classPrivateFieldGet(this, _Client_chatManager, "f").getJoinRequests(chatId, params);
|
|
@@ -2475,7 +2486,7 @@ class Client extends Composer {
|
|
|
2475
2486
|
* Add a single user to a chat.
|
|
2476
2487
|
*
|
|
2477
2488
|
* @method ch
|
|
2478
|
-
* @param chatId The identifier of
|
|
2489
|
+
* @param chatId The identifier of a chat to add the user to.
|
|
2479
2490
|
* @param userId The identifier of the user to add to the chat.
|
|
2480
2491
|
* @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
|
|
2481
2492
|
*/
|
|
@@ -2496,7 +2507,7 @@ class Client extends Composer {
|
|
|
2496
2507
|
* Open a chat.
|
|
2497
2508
|
*
|
|
2498
2509
|
* @method ch
|
|
2499
|
-
* @param chatId The chat to open.
|
|
2510
|
+
* @param chatId The identifier of a chat to open.
|
|
2500
2511
|
*/
|
|
2501
2512
|
async openChat(chatId) {
|
|
2502
2513
|
await __classPrivateFieldGet(this, _Client_updateManager, "f").openChat(chatId);
|
|
@@ -2505,7 +2516,7 @@ class Client extends Composer {
|
|
|
2505
2516
|
* Close a chat previously opened by openChat.
|
|
2506
2517
|
*
|
|
2507
2518
|
* @method ch
|
|
2508
|
-
* @param chatId The chat to close.
|
|
2519
|
+
* @param chatId The identifier of a chat to close.
|
|
2509
2520
|
*/
|
|
2510
2521
|
async closeChat(chatId) {
|
|
2511
2522
|
await __classPrivateFieldGet(this, _Client_updateManager, "f").closeChat(chatId);
|
|
@@ -2544,7 +2555,7 @@ class Client extends Composer {
|
|
|
2544
2555
|
* Set the time to live of the messages of a chat. User-only.
|
|
2545
2556
|
*
|
|
2546
2557
|
* @method ch
|
|
2547
|
-
* @param chatId The identifier of
|
|
2558
|
+
* @param chatId The identifier of a chat.
|
|
2548
2559
|
* @param messageTtl The time to live of the messages in seconds.
|
|
2549
2560
|
*/
|
|
2550
2561
|
async setMessageTtl(chatId, messageTtl) {
|
|
@@ -2563,7 +2574,7 @@ class Client extends Composer {
|
|
|
2563
2574
|
* Archive a single chat. User-only.
|
|
2564
2575
|
*
|
|
2565
2576
|
* @method ch
|
|
2566
|
-
* @param chatId The identifier of
|
|
2577
|
+
* @param chatId The identifier of a chat.
|
|
2567
2578
|
*/
|
|
2568
2579
|
async archiveChat(chatId) {
|
|
2569
2580
|
await __classPrivateFieldGet(this, _Client_chatListManager, "f").archiveChat(chatId);
|
|
@@ -2581,7 +2592,7 @@ class Client extends Composer {
|
|
|
2581
2592
|
* Unarchive a single chat. User-only.
|
|
2582
2593
|
*
|
|
2583
2594
|
* @method ch
|
|
2584
|
-
* @param chatId The identifier of
|
|
2595
|
+
* @param chatId The identifier of a chat.
|
|
2585
2596
|
*/
|
|
2586
2597
|
async unarchiveChat(chatId) {
|
|
2587
2598
|
await __classPrivateFieldGet(this, _Client_chatListManager, "f").unarchiveChat(chatId);
|
|
@@ -2599,7 +2610,7 @@ class Client extends Composer {
|
|
|
2599
2610
|
* Get the settings of a chat. User-only.
|
|
2600
2611
|
*
|
|
2601
2612
|
* @method ch
|
|
2602
|
-
* @param chatId The identifier of
|
|
2613
|
+
* @param chatId The identifier of a chat.
|
|
2603
2614
|
*/
|
|
2604
2615
|
async getChatSettings(chatId) {
|
|
2605
2616
|
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChatSettings(chatId);
|
|
@@ -2665,7 +2676,7 @@ class Client extends Composer {
|
|
|
2665
2676
|
* Hide or show the member list of a group to non-admins. User-only.
|
|
2666
2677
|
*
|
|
2667
2678
|
* @method ch
|
|
2668
|
-
* @param chatId The identifier of
|
|
2679
|
+
* @param chatId The identifier of the group.
|
|
2669
2680
|
* @param visible Whether the member list of the group should be visible.
|
|
2670
2681
|
*/
|
|
2671
2682
|
async setMemberListVisibility(chatId, visible) {
|
|
@@ -2675,7 +2686,7 @@ class Client extends Composer {
|
|
|
2675
2686
|
* Enable or disable topics in a group. User-only.
|
|
2676
2687
|
*
|
|
2677
2688
|
* @method ch
|
|
2678
|
-
* @param chatId The identifier of
|
|
2689
|
+
* @param chatId The identifier of the group.
|
|
2679
2690
|
* @param enabled Whether topics should be enabled in the group.
|
|
2680
2691
|
*/
|
|
2681
2692
|
async setTopicsEnabled(chatId, enabled) {
|
|
@@ -2685,7 +2696,7 @@ class Client extends Composer {
|
|
|
2685
2696
|
* Enable or disable automatic anti-spam in a group. User-only.
|
|
2686
2697
|
*
|
|
2687
2698
|
* @method ch
|
|
2688
|
-
* @param chatId The identifier of
|
|
2699
|
+
* @param chatId The identifier of the group.
|
|
2689
2700
|
* @param enabled Whether automatic anti-spam should be enabled in the group.
|
|
2690
2701
|
*/
|
|
2691
2702
|
async setAntispamEnabled(chatId, enabled) {
|
|
@@ -2695,7 +2706,7 @@ class Client extends Composer {
|
|
|
2695
2706
|
* Enable or disable post signatures in a channel. User-only.
|
|
2696
2707
|
*
|
|
2697
2708
|
* @method ch
|
|
2698
|
-
* @param chatId The identifier of
|
|
2709
|
+
* @param chatId The identifier of the channel.
|
|
2699
2710
|
* @param enabled Whether post signatures should be enabled in the channel.
|
|
2700
2711
|
*/
|
|
2701
2712
|
async setSignaturesEnabled(chatId, enabled, params) {
|
|
@@ -2705,7 +2716,7 @@ class Client extends Composer {
|
|
|
2705
2716
|
* Delete a chat. User-only.
|
|
2706
2717
|
*
|
|
2707
2718
|
* @method ch
|
|
2708
|
-
* @param chatId The identifier of
|
|
2719
|
+
* @param chatId The identifier of a chat.
|
|
2709
2720
|
*/
|
|
2710
2721
|
async deleteChat(chatId) {
|
|
2711
2722
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").deleteChat(chatId);
|
|
@@ -2723,7 +2734,7 @@ class Client extends Composer {
|
|
|
2723
2734
|
*
|
|
2724
2735
|
* @method ch
|
|
2725
2736
|
* @param chatId The identifier of a channel.
|
|
2726
|
-
* @param discussionChatId The identifier of
|
|
2737
|
+
* @param discussionChatId The identifier of a chat to use as discussion for the channel.
|
|
2727
2738
|
*/
|
|
2728
2739
|
async setDiscussionChat(chatId, discussionChatId) {
|
|
2729
2740
|
await __classPrivateFieldGet(this, _Client_chatManager, "f").setDiscussionChat(chatId, discussionChatId);
|
|
@@ -2827,14 +2838,14 @@ class Client extends Composer {
|
|
|
2827
2838
|
* Send a callback query. User-only.
|
|
2828
2839
|
*
|
|
2829
2840
|
* @method cq
|
|
2830
|
-
* @param
|
|
2831
|
-
* @param messageId The message that includes at a button responsible for the callback query question.
|
|
2841
|
+
* @param botId The identifier of the bot to send the callback query to.
|
|
2842
|
+
* @param messageId The identifier of the message that includes at a button responsible for the callback query question.
|
|
2832
2843
|
* @param question The callback query's question.
|
|
2833
2844
|
* @returns The bot's answer to the callback query.
|
|
2834
2845
|
* @cache
|
|
2835
2846
|
*/
|
|
2836
|
-
async sendCallbackQuery(
|
|
2837
|
-
return await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").sendCallbackQuery(
|
|
2847
|
+
async sendCallbackQuery(botId, messageId, question) {
|
|
2848
|
+
return await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").sendCallbackQuery(botId, messageId, question);
|
|
2838
2849
|
}
|
|
2839
2850
|
/**
|
|
2840
2851
|
* Answer a callback query. Bot-only.
|
|
@@ -2852,19 +2863,19 @@ class Client extends Composer {
|
|
|
2852
2863
|
* Send an inline query. User-only.
|
|
2853
2864
|
*
|
|
2854
2865
|
* @method iq
|
|
2855
|
-
* @param
|
|
2856
|
-
* @param chatId The
|
|
2866
|
+
* @param botId The identifier of a bot to send the inline query to.
|
|
2867
|
+
* @param chatId The identifier of the chat from which the inline query is sent.
|
|
2857
2868
|
* @returns The bot's answer to the inline query.
|
|
2858
2869
|
* @cache
|
|
2859
2870
|
*/
|
|
2860
|
-
async sendInlineQuery(
|
|
2861
|
-
return await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").sendInlineQuery(
|
|
2871
|
+
async sendInlineQuery(botId, chatId, params) {
|
|
2872
|
+
return await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").sendInlineQuery(botId, chatId, params);
|
|
2862
2873
|
}
|
|
2863
2874
|
/**
|
|
2864
2875
|
* Answer an inline query. Bot-only.
|
|
2865
2876
|
*
|
|
2866
2877
|
* @method iq
|
|
2867
|
-
* @param id The
|
|
2878
|
+
* @param id The identifier of the inline query to answer.
|
|
2868
2879
|
* @param results The results to answer with.
|
|
2869
2880
|
*/
|
|
2870
2881
|
async answerInlineQuery(id, results, params) {
|
|
@@ -2995,8 +3006,9 @@ class Client extends Composer {
|
|
|
2995
3006
|
* Retrieve multiple stories. User-only.
|
|
2996
3007
|
*
|
|
2997
3008
|
* @method st
|
|
2998
|
-
* @param chatId The identifier of
|
|
3009
|
+
* @param chatId The identifier of a chat.
|
|
2999
3010
|
* @param storyIds The identifiers of the stories to retrieve.
|
|
3011
|
+
* @returns The retrieved stories.
|
|
3000
3012
|
*/
|
|
3001
3013
|
async getStories(chatId, storyIds) {
|
|
3002
3014
|
if (!storyIds.length) {
|
|
@@ -3008,7 +3020,7 @@ class Client extends Composer {
|
|
|
3008
3020
|
* Retrieve a single story. User-only.
|
|
3009
3021
|
*
|
|
3010
3022
|
* @method st
|
|
3011
|
-
* @param chatId The identifier of
|
|
3023
|
+
* @param chatId The identifier of a chat.
|
|
3012
3024
|
* @param storyId The identifier of the story to retrieve.
|
|
3013
3025
|
* @returns The retrieved story.
|
|
3014
3026
|
*/
|
|
@@ -3019,7 +3031,7 @@ class Client extends Composer {
|
|
|
3019
3031
|
* Delete multiple stories. User-only.
|
|
3020
3032
|
*
|
|
3021
3033
|
* @method st
|
|
3022
|
-
* @param chatId The identifier of
|
|
3034
|
+
* @param chatId The identifier of a chat.
|
|
3023
3035
|
* @param storyIds The identifiers of the stories to delete.
|
|
3024
3036
|
*/
|
|
3025
3037
|
async deleteStories(chatId, storyIds) {
|
|
@@ -3029,7 +3041,7 @@ class Client extends Composer {
|
|
|
3029
3041
|
* Delete a single story. User-only.
|
|
3030
3042
|
*
|
|
3031
3043
|
* @method st
|
|
3032
|
-
* @param chatId The identifier of
|
|
3044
|
+
* @param chatId The identifier of a chat.
|
|
3033
3045
|
* @param storyId The identifier of the story to delete.
|
|
3034
3046
|
*/
|
|
3035
3047
|
async deleteStory(chatId, storyId) {
|
|
@@ -3039,7 +3051,7 @@ class Client extends Composer {
|
|
|
3039
3051
|
* Add multiple stories to highlights. User-only.
|
|
3040
3052
|
*
|
|
3041
3053
|
* @method st
|
|
3042
|
-
* @param chatId The identifier of
|
|
3054
|
+
* @param chatId The identifier of a chat.
|
|
3043
3055
|
* @param storyIds The identifiers of the stories to add to highlights.
|
|
3044
3056
|
*/
|
|
3045
3057
|
async addStoriesToHighlights(chatId, storyIds) {
|
|
@@ -3049,7 +3061,7 @@ class Client extends Composer {
|
|
|
3049
3061
|
* Add a single story to highlights. User-only.
|
|
3050
3062
|
*
|
|
3051
3063
|
* @method st
|
|
3052
|
-
* @param chatId The identifier of
|
|
3064
|
+
* @param chatId The identifier of a chat.
|
|
3053
3065
|
* @param storyId The identifier of the story to add to highlights.
|
|
3054
3066
|
*/
|
|
3055
3067
|
async addStoryToHighlights(chatId, storyId) {
|
|
@@ -3059,7 +3071,7 @@ class Client extends Composer {
|
|
|
3059
3071
|
* Remove multiple stories from highlights. User-only.
|
|
3060
3072
|
*
|
|
3061
3073
|
* @method st
|
|
3062
|
-
* @param chatId The identifier of
|
|
3074
|
+
* @param chatId The identifier of a chat.
|
|
3063
3075
|
* @param storyIds The identifiers of the stories to remove from highlights.
|
|
3064
3076
|
*/
|
|
3065
3077
|
async removeStoriesFromHighlights(chatId, storyIds) {
|
|
@@ -3069,7 +3081,7 @@ class Client extends Composer {
|
|
|
3069
3081
|
* Remove a single story from highlights. User-only.
|
|
3070
3082
|
*
|
|
3071
3083
|
* @method st
|
|
3072
|
-
* @param chatId The identifier of
|
|
3084
|
+
* @param chatId The identifier of a chat.
|
|
3073
3085
|
* @param storyId The identifier of the story to remove from highlights.
|
|
3074
3086
|
*/
|
|
3075
3087
|
async removeStoryFromHighlights(chatId, storyId) {
|
|
@@ -3111,7 +3123,7 @@ class Client extends Composer {
|
|
|
3111
3123
|
* Start a video chat. User-only.
|
|
3112
3124
|
*
|
|
3113
3125
|
* @method vc
|
|
3114
|
-
* @param chatId The chat to start the video chat in.
|
|
3126
|
+
* @param chatId The identifier of a chat to start the video chat in.
|
|
3115
3127
|
* @returns The started video chat.
|
|
3116
3128
|
*/
|
|
3117
3129
|
async startVideoChat(chatId, params) {
|
|
@@ -3121,7 +3133,7 @@ class Client extends Composer {
|
|
|
3121
3133
|
* Schedule a video chat. User-only.
|
|
3122
3134
|
*
|
|
3123
3135
|
* @method vc
|
|
3124
|
-
* @param chatId The chat to schedule the video chat in.
|
|
3136
|
+
* @param chatId The identifier of a chat to schedule the video chat in.
|
|
3125
3137
|
* @param startAt A point in time within the future in which the video chat will be started.
|
|
3126
3138
|
* @returns The scheduled video chat.
|
|
3127
3139
|
*/
|
|
@@ -3244,7 +3256,7 @@ class Client extends Composer {
|
|
|
3244
3256
|
* Add a contact. User-only.
|
|
3245
3257
|
*
|
|
3246
3258
|
* @method co
|
|
3247
|
-
* @param userId The identifier of
|
|
3259
|
+
* @param userId The identifier of the user to add as contact.
|
|
3248
3260
|
*/
|
|
3249
3261
|
async addContact(userId, params) {
|
|
3250
3262
|
await __classPrivateFieldGet(this, _Client_accountManager, "f").addContact(userId, params);
|