rubjs 1.1.0 → 2.4.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/README.md +55 -0
- package/package.json +1 -1
- package/rubjs/client.d.ts +1 -0
- package/rubjs/client.js +3 -2
- package/rubjs/index.d.ts +5 -2
- package/rubjs/index.js +41 -1
- package/rubjs/methods/auth/index.d.ts +5 -4
- package/rubjs/methods/auth/index.js +9 -7
- package/rubjs/methods/auth/logout.d.ts +3 -0
- package/rubjs/methods/{messages/send_text.js → auth/logout.js} +3 -3
- package/rubjs/methods/auth/registerDevice.d.ts +3 -0
- package/rubjs/methods/auth/{register_device.js → registerDevice.js} +2 -2
- package/rubjs/methods/auth/sendCode.d.ts +3 -0
- package/rubjs/methods/auth/{send_code.js → sendCode.js} +2 -2
- package/rubjs/methods/auth/signIn.d.ts +3 -0
- package/rubjs/methods/auth/{sign_in.js → signIn.js} +2 -2
- package/rubjs/methods/channels/addChannel.d.ts +3 -0
- package/rubjs/methods/channels/addChannel.js +26 -0
- package/rubjs/methods/channels/addChannelMembers.d.ts +3 -0
- package/rubjs/methods/channels/addChannelMembers.js +22 -0
- package/rubjs/methods/channels/banChannelMember.d.ts +3 -0
- package/rubjs/methods/channels/banChannelMember.js +23 -0
- package/rubjs/methods/channels/cancelChangeObjectOwner.d.ts +3 -0
- package/rubjs/methods/channels/cancelChangeObjectOwner.js +17 -0
- package/rubjs/methods/channels/channelPreviewByJoinLink.d.ts +3 -0
- package/rubjs/methods/{messages/send_photo.js → channels/channelPreviewByJoinLink.js} +5 -3
- package/rubjs/methods/channels/checkChannelUsername.d.ts +3 -0
- package/rubjs/methods/channels/checkChannelUsername.js +19 -0
- package/rubjs/methods/channels/createChannelVoiceChat.d.ts +3 -0
- package/rubjs/methods/channels/createChannelVoiceChat.js +17 -0
- package/rubjs/methods/channels/discardChannelVoiceChat.d.ts +3 -0
- package/rubjs/methods/channels/discardChannelVoiceChat.js +20 -0
- package/rubjs/methods/channels/editChannelInfo.d.ts +4 -0
- package/rubjs/methods/channels/editChannelInfo.js +48 -0
- package/rubjs/methods/channels/getBannedChannelMembers.d.ts +3 -0
- package/rubjs/methods/channels/getBannedChannelMembers.js +20 -0
- package/rubjs/methods/channels/getChannelAdminAccessList.d.ts +3 -0
- package/rubjs/methods/channels/getChannelAdminAccessList.js +20 -0
- package/rubjs/methods/channels/getChannelAdminMembers.d.ts +3 -0
- package/rubjs/methods/channels/getChannelAdminMembers.js +20 -0
- package/rubjs/methods/channels/getChannelAllMembers.d.ts +3 -0
- package/rubjs/methods/channels/getChannelAllMembers.js +21 -0
- package/rubjs/methods/channels/getChannelInfo.d.ts +3 -0
- package/rubjs/methods/channels/getChannelInfo.js +17 -0
- package/rubjs/methods/channels/getChannelLink.d.ts +3 -0
- package/rubjs/methods/channels/getChannelLink.js +17 -0
- package/rubjs/methods/channels/getPendingObjectOwner.d.ts +3 -0
- package/rubjs/methods/channels/getPendingObjectOwner.js +17 -0
- package/rubjs/methods/channels/index.d.ts +26 -0
- package/rubjs/methods/channels/index.js +56 -0
- package/rubjs/methods/channels/joinChannelAction.d.ts +3 -0
- package/rubjs/methods/channels/joinChannelAction.js +19 -0
- package/rubjs/methods/channels/joinChannelByLink.d.ts +3 -0
- package/rubjs/methods/channels/joinChannelByLink.js +19 -0
- package/rubjs/methods/channels/leaveChannelVoiceChat.d.ts +3 -0
- package/rubjs/methods/channels/leaveChannelVoiceChat.js +20 -0
- package/rubjs/methods/channels/removeChannel.d.ts +3 -0
- package/rubjs/methods/channels/removeChannel.js +17 -0
- package/rubjs/methods/channels/requestChangeObjectOwner.d.ts +3 -0
- package/rubjs/methods/{messages/edit_message.js → channels/requestChangeObjectOwner.js} +5 -7
- package/rubjs/methods/channels/seenChannelMessages.d.ts +3 -0
- package/rubjs/methods/channels/seenChannelMessages.js +21 -0
- package/rubjs/methods/channels/setChannelLink.d.ts +3 -0
- package/rubjs/methods/channels/setChannelLink.js +17 -0
- package/rubjs/methods/channels/setChannelVoiceChatSetting.d.ts +3 -0
- package/rubjs/methods/channels/setChannelVoiceChatSetting.js +26 -0
- package/rubjs/methods/channels/updateChannelUsername.d.ts +3 -0
- package/rubjs/methods/channels/updateChannelUsername.js +20 -0
- package/rubjs/methods/chats/actionOnJoinRequest.d.ts +3 -0
- package/rubjs/methods/chats/actionOnJoinRequest.js +22 -0
- package/rubjs/methods/chats/addLiveComment.d.ts +3 -0
- package/rubjs/methods/chats/addLiveComment.js +17 -0
- package/rubjs/methods/chats/clickMessageUrl.d.ts +3 -0
- package/rubjs/methods/chats/clickMessageUrl.js +17 -0
- package/rubjs/methods/chats/createJoinLink.d.ts +3 -0
- package/rubjs/methods/chats/createJoinLink.js +23 -0
- package/rubjs/methods/chats/deleteAvatar.d.ts +3 -0
- package/rubjs/methods/chats/deleteAvatar.js +17 -0
- package/rubjs/methods/chats/deleteChatHistory.d.ts +3 -0
- package/rubjs/methods/chats/deleteChatHistory.js +20 -0
- package/rubjs/methods/chats/editJoinLink.d.ts +3 -0
- package/rubjs/methods/chats/editJoinLink.js +34 -0
- package/rubjs/methods/chats/getAbsObjects.d.ts +3 -0
- package/rubjs/methods/chats/getAbsObjects.js +19 -0
- package/rubjs/methods/chats/getAvatars.d.ts +3 -0
- package/rubjs/methods/chats/getAvatars.js +17 -0
- package/rubjs/methods/chats/getChatReaction.d.ts +3 -0
- package/rubjs/methods/chats/getChatReaction.js +17 -0
- package/rubjs/methods/chats/getChats.d.ts +3 -0
- package/rubjs/methods/chats/getChats.js +17 -0
- package/rubjs/methods/chats/getChatsUpdates.d.ts +3 -0
- package/rubjs/methods/chats/getChatsUpdates.js +17 -0
- package/rubjs/methods/chats/getJoinLinks.d.ts +3 -0
- package/rubjs/methods/chats/getJoinLinks.js +17 -0
- package/rubjs/methods/chats/getJoinRequests.d.ts +3 -0
- package/rubjs/methods/chats/getJoinRequests.js +17 -0
- package/rubjs/methods/chats/getLinkFromAppUrl.d.ts +3 -0
- package/rubjs/methods/chats/getLinkFromAppUrl.js +17 -0
- package/rubjs/methods/chats/getLiveComments.d.ts +3 -0
- package/rubjs/methods/chats/getLiveComments.js +17 -0
- package/rubjs/methods/chats/getLivePlayUrl.d.ts +3 -0
- package/rubjs/methods/chats/getLivePlayUrl.js +17 -0
- package/rubjs/methods/chats/getLiveStatus.d.ts +3 -0
- package/rubjs/methods/chats/getLiveStatus.js +17 -0
- package/rubjs/methods/chats/getObjectInfoByUsername.d.ts +3 -0
- package/rubjs/methods/chats/getObjectInfoByUsername.js +19 -0
- package/rubjs/methods/chats/getTopChatUsers.d.ts +3 -0
- package/rubjs/methods/chats/getTopChatUsers.js +18 -0
- package/rubjs/methods/chats/index.d.ts +29 -0
- package/rubjs/methods/chats/index.js +62 -0
- package/rubjs/methods/chats/removeFromTopChatUsers.d.ts +3 -0
- package/rubjs/methods/chats/removeFromTopChatUsers.js +17 -0
- package/rubjs/methods/chats/removeJoinLink.d.ts +3 -0
- package/rubjs/methods/chats/removeJoinLink.js +19 -0
- package/rubjs/methods/chats/searchChatMessages.d.ts +3 -0
- package/rubjs/methods/chats/searchChatMessages.js +23 -0
- package/rubjs/methods/chats/searchGlobalMessages.d.ts +3 -0
- package/rubjs/methods/chats/searchGlobalMessages.js +17 -0
- package/rubjs/methods/chats/seenChats.d.ts +3 -0
- package/rubjs/methods/chats/seenChats.js +17 -0
- package/rubjs/methods/chats/sendChatActivity.d.ts +3 -0
- package/rubjs/methods/chats/sendChatActivity.js +19 -0
- package/rubjs/methods/chats/sendLive.d.ts +3 -0
- package/rubjs/methods/chats/sendLive.js +28 -0
- package/rubjs/methods/chats/setActionChat.d.ts +3 -0
- package/rubjs/methods/chats/setActionChat.js +19 -0
- package/rubjs/methods/chats/uploadAvatar.d.ts +3 -0
- package/rubjs/methods/chats/uploadAvatar.js +29 -0
- package/rubjs/methods/contacts/addAddressBook.d.ts +3 -0
- package/rubjs/methods/contacts/addAddressBook.js +17 -0
- package/rubjs/methods/contacts/deleteContact.d.ts +3 -0
- package/rubjs/methods/contacts/deleteContact.js +17 -0
- package/rubjs/methods/contacts/getContacts.d.ts +3 -0
- package/rubjs/methods/contacts/getContacts.js +17 -0
- package/rubjs/methods/contacts/getContactsLastOnline.d.ts +3 -0
- package/rubjs/methods/contacts/getContactsLastOnline.js +17 -0
- package/rubjs/methods/contacts/getContactsUpdates.d.ts +3 -0
- package/rubjs/methods/contacts/getContactsUpdates.js +17 -0
- package/rubjs/methods/contacts/index.d.ts +7 -0
- package/rubjs/methods/contacts/index.js +18 -0
- package/rubjs/methods/contacts/resetContacts.d.ts +3 -0
- package/rubjs/methods/contacts/resetContacts.js +18 -0
- package/rubjs/methods/extras/banMember.d.ts +3 -0
- package/rubjs/methods/extras/banMember.js +20 -0
- package/rubjs/methods/extras/getInfo.d.ts +3 -0
- package/rubjs/methods/extras/getInfo.js +26 -0
- package/rubjs/methods/extras/getObjectByUsername.d.ts +3 -0
- package/rubjs/methods/extras/getObjectByUsername.js +19 -0
- package/rubjs/methods/extras/getProfileLinkItems.d.ts +3 -0
- package/rubjs/methods/extras/getProfileLinkItems.js +17 -0
- package/rubjs/methods/extras/getRelatedObjects.d.ts +3 -0
- package/rubjs/methods/extras/getRelatedObjects.js +17 -0
- package/rubjs/methods/extras/getTranscription.d.ts +3 -0
- package/rubjs/methods/extras/getTranscription.js +20 -0
- package/rubjs/methods/extras/index.d.ts +13 -0
- package/rubjs/methods/extras/index.js +30 -0
- package/rubjs/methods/extras/join.d.ts +3 -0
- package/rubjs/methods/extras/join.js +22 -0
- package/rubjs/methods/extras/leaveChat.d.ts +3 -0
- package/rubjs/methods/extras/leaveChat.js +20 -0
- package/rubjs/methods/extras/reportObject.d.ts +14 -0
- package/rubjs/methods/extras/reportObject.js +32 -0
- package/rubjs/methods/extras/searchGlobalObjects.d.ts +3 -0
- package/rubjs/methods/extras/searchGlobalObjects.js +17 -0
- package/rubjs/methods/extras/transcribeVoice.d.ts +3 -0
- package/rubjs/methods/extras/transcribeVoice.js +17 -0
- package/rubjs/methods/extras/userIsAdmin.d.ts +3 -0
- package/rubjs/methods/extras/userIsAdmin.js +29 -0
- package/rubjs/methods/gif/addToMyGifSet.d.ts +3 -0
- package/rubjs/methods/gif/addToMyGifSet.js +17 -0
- package/rubjs/methods/gif/getMyGifSet.d.ts +3 -0
- package/rubjs/methods/gif/getMyGifSet.js +17 -0
- package/rubjs/methods/gif/index.d.ts +4 -0
- package/rubjs/methods/gif/index.js +12 -0
- package/rubjs/methods/gif/removeFromMyGifSet.d.ts +3 -0
- package/rubjs/methods/gif/removeFromMyGifSet.js +17 -0
- package/rubjs/methods/groups/addGroup.d.ts +3 -0
- package/rubjs/methods/groups/addGroup.js +19 -0
- package/rubjs/methods/groups/addGroupMembers.d.ts +3 -0
- package/rubjs/methods/groups/addGroupMembers.js +19 -0
- package/rubjs/methods/groups/banGroupMember.d.ts +3 -0
- package/rubjs/methods/groups/banGroupMember.js +23 -0
- package/rubjs/methods/groups/createGroupVoiceChat.d.ts +3 -0
- package/rubjs/methods/groups/createGroupVoiceChat.js +17 -0
- package/rubjs/methods/groups/deleteNoAccessGroupChat.d.ts +3 -0
- package/rubjs/methods/groups/deleteNoAccessGroupChat.js +17 -0
- package/rubjs/methods/groups/discardGroupVoiceChat.d.ts +3 -0
- package/rubjs/methods/groups/discardGroupVoiceChat.js +20 -0
- package/rubjs/methods/groups/editGroupInfo.d.ts +6 -0
- package/rubjs/methods/groups/editGroupInfo.js +51 -0
- package/rubjs/methods/groups/getBannedGroupMembers.d.ts +3 -0
- package/rubjs/methods/groups/getBannedGroupMembers.js +17 -0
- package/rubjs/methods/groups/getGroupAdminAccessList.d.ts +3 -0
- package/rubjs/methods/groups/getGroupAdminAccessList.js +20 -0
- package/rubjs/methods/groups/getGroupAdminMembers.d.ts +3 -0
- package/rubjs/methods/groups/getGroupAdminMembers.js +17 -0
- package/rubjs/methods/groups/getGroupAllMembers.d.ts +3 -0
- package/rubjs/methods/groups/getGroupAllMembers.js +21 -0
- package/rubjs/methods/groups/getGroupDefaultAccess.d.ts +3 -0
- package/rubjs/methods/groups/getGroupDefaultAccess.js +17 -0
- package/rubjs/methods/groups/getGroupInfo.d.ts +3 -0
- package/rubjs/methods/groups/getGroupInfo.js +17 -0
- package/rubjs/methods/groups/getGroupLink.d.ts +3 -0
- package/rubjs/methods/groups/getGroupLink.js +17 -0
- package/rubjs/methods/groups/getGroupMentionList.d.ts +3 -0
- package/rubjs/methods/groups/getGroupMentionList.js +20 -0
- package/rubjs/methods/groups/getGroupOnlineCount.d.ts +3 -0
- package/rubjs/methods/groups/getGroupOnlineCount.js +17 -0
- package/rubjs/methods/groups/getGroupVoiceChatUpdates.d.ts +3 -0
- package/rubjs/methods/groups/getGroupVoiceChatUpdates.js +21 -0
- package/rubjs/methods/groups/groupPreviewByJoinLink.d.ts +3 -0
- package/rubjs/methods/groups/groupPreviewByJoinLink.js +19 -0
- package/rubjs/methods/groups/index.d.ts +28 -0
- package/rubjs/methods/groups/index.js +60 -0
- package/rubjs/methods/groups/joinGroup.d.ts +3 -0
- package/rubjs/methods/groups/joinGroup.js +19 -0
- package/rubjs/methods/groups/leaveGroup.d.ts +3 -0
- package/rubjs/methods/groups/leaveGroup.js +17 -0
- package/rubjs/methods/groups/leaveGroupVoiceChat.d.ts +3 -0
- package/rubjs/methods/groups/leaveGroupVoiceChat.js +20 -0
- package/rubjs/methods/groups/removeGroup.d.ts +3 -0
- package/rubjs/methods/groups/removeGroup.js +17 -0
- package/rubjs/methods/groups/seenGroupMessages.d.ts +3 -0
- package/rubjs/methods/groups/seenGroupMessages.js +21 -0
- package/rubjs/methods/groups/setGroupAdmin.d.ts +5 -0
- package/rubjs/methods/groups/setGroupAdmin.js +26 -0
- package/rubjs/methods/groups/setGroupDefaultAccess.d.ts +4 -0
- package/rubjs/methods/groups/setGroupDefaultAccess.js +22 -0
- package/rubjs/methods/groups/setGroupLink.d.ts +3 -0
- package/rubjs/methods/groups/setGroupLink.js +17 -0
- package/rubjs/methods/groups/setGroupVoiceChatSetting.d.ts +3 -0
- package/rubjs/methods/groups/setGroupVoiceChatSetting.js +26 -0
- package/rubjs/methods/index.d.ts +190 -41
- package/rubjs/methods/index.js +827 -57
- package/rubjs/methods/messages/actionOnMessageReaction.d.ts +3 -0
- package/rubjs/methods/messages/{action_on_message_reaction.js → actionOnMessageReaction.js} +2 -2
- package/rubjs/methods/messages/createPoll.d.ts +3 -0
- package/rubjs/methods/messages/{create_poll.js → createPoll.js} +2 -2
- package/rubjs/methods/messages/deleteMessages.d.ts +3 -0
- package/rubjs/methods/messages/{delete_messages.js → deleteMessages.js} +2 -2
- package/rubjs/methods/messages/editMessage.d.ts +3 -0
- package/rubjs/methods/messages/editMessage.js +23 -0
- package/rubjs/methods/messages/forwardMessages.d.ts +3 -0
- package/rubjs/methods/messages/{forward_messages.js → forwardMessages.js} +2 -2
- package/rubjs/methods/messages/getMessageShareUrl.d.ts +3 -0
- package/rubjs/methods/messages/{get_message_share_url.js → getMessageShareUrl.js} +2 -2
- package/rubjs/methods/messages/getMessages.d.ts +3 -0
- package/rubjs/methods/messages/getMessages.js +23 -0
- package/rubjs/methods/messages/getMessagesByID.d.ts +3 -0
- package/rubjs/methods/messages/{get_messages_by_id.js → getMessagesByID.js} +2 -2
- package/rubjs/methods/messages/getMessagesInterval.d.ts +3 -0
- package/rubjs/methods/messages/{get_messages_interval.js → getMessagesInterval.js} +2 -2
- package/rubjs/methods/messages/getMessagesUpdates.d.ts +3 -0
- package/rubjs/methods/messages/{get_messages_updates.js → getMessagesUpdates.js} +2 -2
- package/rubjs/methods/messages/getPollOptionVoters.d.ts +3 -0
- package/rubjs/methods/messages/{get_poll_option_voters.js → getPollOptionVoters.js} +2 -2
- package/rubjs/methods/messages/getPollStatus.d.ts +3 -0
- package/rubjs/methods/messages/{get_poll_status.js → getPollStatus.js} +2 -2
- package/rubjs/methods/messages/index.d.ts +26 -17
- package/rubjs/methods/messages/index.js +51 -33
- package/rubjs/methods/messages/requestSendFile.d.ts +4 -0
- package/rubjs/methods/{utilities/request_send_file.js → messages/requestSendFile.js} +2 -2
- package/rubjs/methods/messages/sendDocument.d.ts +3 -0
- package/rubjs/methods/messages/sendDocument.js +17 -0
- package/rubjs/methods/messages/sendGif.d.ts +3 -0
- package/rubjs/methods/messages/sendGif.js +17 -0
- package/rubjs/methods/messages/sendMessage.d.ts +3 -0
- package/rubjs/methods/messages/{send_message.js → sendMessage.js} +32 -20
- package/rubjs/methods/messages/sendMusic.d.ts +3 -0
- package/rubjs/methods/messages/sendMusic.js +17 -0
- package/rubjs/methods/messages/sendPhoto.d.ts +3 -0
- package/rubjs/methods/messages/sendPhoto.js +17 -0
- package/rubjs/methods/messages/sendSticker.d.ts +3 -0
- package/rubjs/methods/messages/sendSticker.js +17 -0
- package/rubjs/methods/messages/sendText.d.ts +3 -0
- package/rubjs/methods/messages/sendText.js +17 -0
- package/rubjs/methods/messages/sendVideo.d.ts +3 -0
- package/rubjs/methods/messages/sendVideo.js +17 -0
- package/rubjs/methods/messages/sendVideoMessage.d.ts +3 -0
- package/rubjs/methods/messages/sendVideoMessage.js +17 -0
- package/rubjs/methods/messages/sendVoice.d.ts +3 -0
- package/rubjs/methods/messages/sendVoice.js +17 -0
- package/rubjs/methods/messages/setPinMessage.d.ts +3 -0
- package/rubjs/methods/messages/{set_pin_message.js → setPinMessage.js} +2 -2
- package/rubjs/methods/messages/votePoll.d.ts +3 -0
- package/rubjs/methods/messages/{vote_poll.js → votePoll.js} +2 -2
- package/rubjs/methods/settings/changePassword.d.ts +3 -0
- package/rubjs/methods/settings/changePassword.js +17 -0
- package/rubjs/methods/settings/checkTwoStepPasscode.d.ts +3 -0
- package/rubjs/methods/settings/checkTwoStepPasscode.js +17 -0
- package/rubjs/methods/settings/deleteFolder.d.ts +3 -0
- package/rubjs/methods/settings/deleteFolder.js +17 -0
- package/rubjs/methods/settings/getBlockedUsers.d.ts +3 -0
- package/rubjs/methods/settings/getBlockedUsers.js +17 -0
- package/rubjs/methods/settings/getFolders.d.ts +3 -0
- package/rubjs/methods/settings/getFolders.js +17 -0
- package/rubjs/methods/settings/getMySessions.d.ts +3 -0
- package/rubjs/methods/settings/getMySessions.js +17 -0
- package/rubjs/methods/settings/getPrivacySetting.d.ts +3 -0
- package/rubjs/methods/settings/getPrivacySetting.js +17 -0
- package/rubjs/methods/settings/getSuggestedFolders.d.ts +3 -0
- package/rubjs/methods/settings/getSuggestedFolders.js +17 -0
- package/rubjs/methods/settings/getTwoPasscodeStatus.d.ts +3 -0
- package/rubjs/methods/settings/getTwoPasscodeStatus.js +17 -0
- package/rubjs/methods/settings/index.d.ts +19 -0
- package/rubjs/methods/settings/index.js +42 -0
- package/rubjs/methods/settings/requestRecoveryEmail.d.ts +3 -0
- package/rubjs/methods/settings/requestRecoveryEmail.js +20 -0
- package/rubjs/methods/settings/setSetting.d.ts +5 -0
- package/rubjs/methods/settings/setSetting.js +50 -0
- package/rubjs/methods/settings/setupTwoStepVerification.d.ts +3 -0
- package/rubjs/methods/settings/setupTwoStepVerification.js +21 -0
- package/rubjs/methods/settings/terminateOtherSessions.d.ts +3 -0
- package/rubjs/methods/settings/terminateOtherSessions.js +18 -0
- package/rubjs/methods/settings/terminateSession.d.ts +3 -0
- package/rubjs/methods/settings/terminateSession.js +17 -0
- package/rubjs/methods/settings/turnOffTwoStep.d.ts +3 -0
- package/rubjs/methods/settings/turnOffTwoStep.js +18 -0
- package/rubjs/methods/settings/updateProfile.d.ts +3 -0
- package/rubjs/methods/settings/updateProfile.js +30 -0
- package/rubjs/methods/settings/updateUsername.d.ts +3 -0
- package/rubjs/methods/settings/updateUsername.js +17 -0
- package/rubjs/methods/settings/verifyRecoveryEmail.d.ts +3 -0
- package/rubjs/methods/settings/verifyRecoveryEmail.js +17 -0
- package/rubjs/methods/stickers/actionOnStickerSet.d.ts +3 -0
- package/rubjs/methods/stickers/actionOnStickerSet.js +19 -0
- package/rubjs/methods/stickers/getMyStickerSets.d.ts +3 -0
- package/rubjs/methods/stickers/getMyStickerSets.js +17 -0
- package/rubjs/methods/stickers/getStickerSetByID.d.ts +3 -0
- package/rubjs/methods/stickers/getStickerSetByID.js +17 -0
- package/rubjs/methods/stickers/getStickersByEmoji.d.ts +3 -0
- package/rubjs/methods/stickers/getStickersByEmoji.js +17 -0
- package/rubjs/methods/stickers/getStickersBySetIds.d.ts +3 -0
- package/rubjs/methods/stickers/getStickersBySetIds.js +19 -0
- package/rubjs/methods/stickers/getTrendStickerSets.d.ts +3 -0
- package/rubjs/methods/stickers/getTrendStickerSets.js +17 -0
- package/rubjs/methods/stickers/index.d.ts +8 -0
- package/rubjs/methods/stickers/index.js +20 -0
- package/rubjs/methods/stickers/searchStickers.d.ts +3 -0
- package/rubjs/methods/stickers/searchStickers.js +17 -0
- package/rubjs/methods/users/checkUserUsername.d.ts +3 -0
- package/rubjs/methods/users/checkUserUsername.js +17 -0
- package/rubjs/methods/users/deleteUserChat.d.ts +3 -0
- package/rubjs/methods/users/deleteUserChat.js +20 -0
- package/rubjs/methods/users/getMe.d.ts +3 -0
- package/rubjs/methods/users/getMe.js +17 -0
- package/rubjs/methods/users/getUserInfo.d.ts +4 -0
- package/rubjs/methods/users/{get_user_info.js → getUserInfo.js} +2 -2
- package/rubjs/methods/users/index.d.ts +6 -2
- package/rubjs/methods/users/index.js +11 -3
- package/rubjs/methods/users/setBlockUser.d.ts +3 -0
- package/rubjs/methods/users/setBlockUser.js +19 -0
- package/rubjs/methods/utilities/download.d.ts +4 -0
- package/rubjs/methods/utilities/download.js +17 -0
- package/rubjs/methods/utilities/downloadProfilePicture.d.ts +3 -0
- package/rubjs/methods/utilities/downloadProfilePicture.js +27 -0
- package/rubjs/methods/utilities/get.d.ts +4 -0
- package/rubjs/methods/utilities/get.js +21 -0
- package/rubjs/methods/utilities/index.d.ts +7 -3
- package/rubjs/methods/utilities/index.js +13 -5
- package/rubjs/methods/utilities/post.d.ts +4 -0
- package/rubjs/methods/utilities/post.js +21 -0
- package/rubjs/methods/utilities/run.js +8 -1
- package/rubjs/methods/utilities/start.js +8 -7
- package/rubjs/methods/utilities/thumbnail.d.ts +1 -0
- package/rubjs/methods/utilities/thumbnail.js +15 -1
- package/rubjs/network/index.d.ts +4 -3
- package/rubjs/network/index.js +77 -21
- package/rubjs/parser/index.d.ts +25 -0
- package/rubjs/parser/index.js +112 -0
- package/rubjs/session/index.js +1 -1
- package/rubjs/{methods/auth/types/sign_in.d.ts → types/auth.d.ts} +11 -1
- package/rubjs/types/chats.d.ts +79 -0
- package/rubjs/{methods/types/message_update.d.ts → types/decorators.d.ts} +56 -0
- package/rubjs/types/groups.d.ts +129 -0
- package/rubjs/types/index.d.ts +8 -0
- package/rubjs/types/index.js +53 -0
- package/rubjs/types/message.d.ts +25 -0
- package/rubjs/types/message.js +61 -0
- package/rubjs/types/messages.d.ts +176 -0
- package/rubjs/{methods/users/types/get_user_info.d.ts → types/users.d.ts} +1 -0
- package/rubjs/utils/filters.d.ts +28 -16
- package/rubjs/utils/filters.js +90 -31
- package/rubjs/utils/index.d.ts +2 -1
- package/rubjs/utils/index.js +3 -1
- package/rubjs/utils/utils.d.ts +10 -0
- package/rubjs/utils/utils.js +12 -0
- package/rubjs/methods/auth/register_device.d.ts +0 -3
- package/rubjs/methods/auth/send_code.d.ts +0 -4
- package/rubjs/methods/auth/sign_in.d.ts +0 -4
- package/rubjs/methods/auth/types/index.d.ts +0 -3
- package/rubjs/methods/auth/types/send_code.d.ts +0 -10
- package/rubjs/methods/messages/action_on_message_reaction.d.ts +0 -4
- package/rubjs/methods/messages/create_poll.d.ts +0 -4
- package/rubjs/methods/messages/delete_messages.d.ts +0 -4
- package/rubjs/methods/messages/edit_message.d.ts +0 -4
- package/rubjs/methods/messages/forward_messages.d.ts +0 -4
- package/rubjs/methods/messages/get_message_share_url.d.ts +0 -4
- package/rubjs/methods/messages/get_messages_by_id.d.ts +0 -4
- package/rubjs/methods/messages/get_messages_interval.d.ts +0 -4
- package/rubjs/methods/messages/get_messages_updates.d.ts +0 -4
- package/rubjs/methods/messages/get_poll_option_voters.d.ts +0 -4
- package/rubjs/methods/messages/get_poll_status.d.ts +0 -4
- package/rubjs/methods/messages/send_message.d.ts +0 -4
- package/rubjs/methods/messages/send_photo.d.ts +0 -4
- package/rubjs/methods/messages/send_text.d.ts +0 -4
- package/rubjs/methods/messages/set_pin_message.d.ts +0 -4
- package/rubjs/methods/messages/types/action_on_message_reaction.d.ts +0 -10
- package/rubjs/methods/messages/types/delete_message.d.ts +0 -34
- package/rubjs/methods/messages/types/edit_message.d.ts +0 -38
- package/rubjs/methods/messages/types/forward_messages.d.ts +0 -7
- package/rubjs/methods/messages/types/forward_messages.js +0 -2
- package/rubjs/methods/messages/types/get_messages_by_id.d.ts +0 -14
- package/rubjs/methods/messages/types/get_messages_by_id.js +0 -2
- package/rubjs/methods/messages/types/get_messages_interval.d.ts +0 -43
- package/rubjs/methods/messages/types/get_messages_interval.js +0 -2
- package/rubjs/methods/messages/types/get_messages_updates.d.ts +0 -29
- package/rubjs/methods/messages/types/get_messages_updates.js +0 -2
- package/rubjs/methods/messages/types/get_poll_option_voters.d.ts +0 -19
- package/rubjs/methods/messages/types/get_poll_option_voters.js +0 -2
- package/rubjs/methods/messages/types/get_poll_status.d.ts +0 -13
- package/rubjs/methods/messages/types/get_poll_status.js +0 -2
- package/rubjs/methods/messages/types/index.d.ts +0 -13
- package/rubjs/methods/messages/types/index.js +0 -2
- package/rubjs/methods/messages/types/message_result.d.ts +0 -7
- package/rubjs/methods/messages/types/message_result.js +0 -2
- package/rubjs/methods/messages/types/mini_typs.d.ts +0 -5
- package/rubjs/methods/messages/types/mini_typs.js +0 -2
- package/rubjs/methods/messages/types/set_pin_message.d.ts +0 -15
- package/rubjs/methods/messages/types/set_pin_message.js +0 -2
- package/rubjs/methods/messages/vote_poll.d.ts +0 -4
- package/rubjs/methods/types/chat_updates.d.ts +0 -26
- package/rubjs/methods/types/chat_updates.js +0 -2
- package/rubjs/methods/types/index.d.ts +0 -5
- package/rubjs/methods/types/index.js +0 -2
- package/rubjs/methods/types/message_update.js +0 -2
- package/rubjs/methods/types/show_activities.d.ts +0 -7
- package/rubjs/methods/types/show_activities.js +0 -2
- package/rubjs/methods/types/show_notifications.d.ts +0 -14
- package/rubjs/methods/types/show_notifications.js +0 -2
- package/rubjs/methods/users/get_user_info.d.ts +0 -4
- package/rubjs/methods/users/types/get_user_info.js +0 -2
- package/rubjs/methods/users/types/index.d.ts +0 -2
- package/rubjs/methods/users/types/index.js +0 -2
- package/rubjs/methods/utilities/request_send_file.d.ts +0 -4
- package/rubjs/methods/utilities/types/index.d.ts +0 -2
- package/rubjs/methods/utilities/types/index.js +0 -2
- package/rubjs/methods/utilities/types/request_send_file.d.ts +0 -7
- package/rubjs/methods/utilities/types/request_send_file.js +0 -2
- /package/rubjs/{methods/auth/types/index.js → types/auth.js} +0 -0
- /package/rubjs/{methods/auth/types/send_code.js → types/chats.js} +0 -0
- /package/rubjs/{methods/auth/types/sign_in.js → types/decorators.js} +0 -0
- /package/rubjs/{methods/messages/types/action_on_message_reaction.js → types/groups.js} +0 -0
- /package/rubjs/{methods/messages/types/delete_message.js → types/messages.js} +0 -0
- /package/rubjs/{methods/messages/types/edit_message.js → types/users.js} +0 -0
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function actionOnMessageReaction(object_guid_1, message_id_1) {
|
13
13
|
return __awaiter(this, arguments, void 0, function* (object_guid, message_id, reaction_id = null, action = "Add") {
|
14
14
|
if (action === "Remove")
|
15
15
|
reaction_id = null;
|
@@ -22,4 +22,4 @@ function action_on_message_reaction(object_guid_1, message_id_1) {
|
|
22
22
|
return yield this.builder("actionOnMessageReaction", input);
|
23
23
|
});
|
24
24
|
}
|
25
|
-
exports.default =
|
25
|
+
exports.default = actionOnMessageReaction;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import Client from '../..';
|
2
|
+
declare function createPoll(this: Client, object_guid: string, question: string, options: string[], type?: "Regular" | "Quiz", is_anonymous?: boolean, allows_multiple_answers?: boolean, correct_option_index?: number, explanation?: string, reply_to_message_id?: string): Promise<any>;
|
3
|
+
export default createPoll;
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function createPoll(object_guid_1, question_1, options_1) {
|
13
13
|
return __awaiter(this, arguments, void 0, function* (object_guid, question, options, type = "Regular", is_anonymous = true, allows_multiple_answers = true, correct_option_index, explanation, reply_to_message_id) {
|
14
14
|
if (options.length <= 1)
|
15
15
|
throw new Error("The `options` argument must have more than two string values.");
|
@@ -32,4 +32,4 @@ function create_poll(object_guid_1, question_1, options_1) {
|
|
32
32
|
return yield this.builder("createPoll", input);
|
33
33
|
});
|
34
34
|
}
|
35
|
-
exports.default =
|
35
|
+
exports.default = createPoll;
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function deleteMessages(object_guid_1, message_ids_1) {
|
13
13
|
return __awaiter(this, arguments, void 0, function* (object_guid, message_ids, type = "Global") {
|
14
14
|
if (!["Global", "Local"].includes(type))
|
15
15
|
throw new Error('`type` argument can only be in ("Global", "Local").');
|
@@ -23,4 +23,4 @@ function delete_messages(object_guid_1, message_ids_1) {
|
|
23
23
|
});
|
24
24
|
});
|
25
25
|
}
|
26
|
-
exports.default =
|
26
|
+
exports.default = deleteMessages;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const parser_1 = __importDefault(require("../../parser"));
|
16
|
+
function editMessage(object_guid, message_id, text) {
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
18
|
+
const input = Object.assign({ object_guid,
|
19
|
+
message_id }, parser_1.default.toMetadata(text));
|
20
|
+
return yield this.builder("editMessage", input);
|
21
|
+
});
|
22
|
+
}
|
23
|
+
exports.default = editMessage;
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function forwardMessages(from_object_guid, to_object_guid, message_ids) {
|
13
13
|
return __awaiter(this, void 0, void 0, function* () {
|
14
14
|
if (["me", "cloud", "self"].includes(to_object_guid.toLowerCase())) {
|
15
15
|
to_object_guid = this.userGuid;
|
@@ -28,4 +28,4 @@ function forward_messages(from_object_guid, to_object_guid, message_ids) {
|
|
28
28
|
return this.builder("forwardMessages", input);
|
29
29
|
});
|
30
30
|
}
|
31
|
-
exports.default =
|
31
|
+
exports.default = forwardMessages;
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function getMessageShareUrl(object_guid, message_id) {
|
13
13
|
return __awaiter(this, void 0, void 0, function* () {
|
14
14
|
return yield this.builder("getMessageShareUrl", { object_guid, message_id });
|
15
15
|
});
|
16
16
|
}
|
17
|
-
exports.default =
|
17
|
+
exports.default = getMessageShareUrl;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getMessages(object_guid_1, filter_type_1, max_id_1, limit_1) {
|
13
|
+
return __awaiter(this, arguments, void 0, function* (object_guid, filter_type, max_id, limit, sort = "FromMax") {
|
14
|
+
return yield this.builder("getMessages", {
|
15
|
+
object_guid,
|
16
|
+
filter_type,
|
17
|
+
max_id,
|
18
|
+
limit,
|
19
|
+
sort,
|
20
|
+
});
|
21
|
+
});
|
22
|
+
}
|
23
|
+
exports.default = getMessages;
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function getMessagesByID(object_guid, message_ids) {
|
13
13
|
return __awaiter(this, void 0, void 0, function* () {
|
14
14
|
if (typeof message_ids === "string")
|
15
15
|
message_ids = [message_ids];
|
@@ -19,4 +19,4 @@ function get_messages_by_id(object_guid, message_ids) {
|
|
19
19
|
});
|
20
20
|
});
|
21
21
|
}
|
22
|
-
exports.default =
|
22
|
+
exports.default = getMessagesByID;
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function getMessagesInterval(object_guid, middle_message_id) {
|
13
13
|
return __awaiter(this, void 0, void 0, function* () {
|
14
14
|
return yield this.builder("getMessagesInterval", {
|
15
15
|
object_guid,
|
@@ -17,4 +17,4 @@ function get_messages_interval(object_guid, middle_message_id) {
|
|
17
17
|
});
|
18
18
|
});
|
19
19
|
}
|
20
|
-
exports.default =
|
20
|
+
exports.default = getMessagesInterval;
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function getMessagesUpdates(object_guid_1) {
|
13
13
|
return __awaiter(this, arguments, void 0, function* (object_guid, state = Math.round(Date.now() / 1000) - 150) {
|
14
14
|
return yield this.builder("getMessagesUpdates", { object_guid, state });
|
15
15
|
});
|
16
16
|
}
|
17
|
-
exports.default =
|
17
|
+
exports.default = getMessagesUpdates;
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function getPollOptionVoters(poll_id_1, selection_index_1) {
|
13
13
|
return __awaiter(this, arguments, void 0, function* (poll_id, selection_index, start_id = null) {
|
14
14
|
return yield this.builder("getPollOptionVoters", {
|
15
15
|
poll_id,
|
@@ -18,4 +18,4 @@ function get_poll_option_voters(poll_id_1, selection_index_1) {
|
|
18
18
|
});
|
19
19
|
});
|
20
20
|
}
|
21
|
-
exports.default =
|
21
|
+
exports.default = getPollOptionVoters;
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function getPollStatus(poll_id) {
|
13
13
|
return __awaiter(this, void 0, void 0, function* () {
|
14
14
|
return yield this.builder("getPollStatus", { poll_id });
|
15
15
|
});
|
16
16
|
}
|
17
|
-
exports.default =
|
17
|
+
exports.default = getPollStatus;
|
@@ -1,17 +1,26 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import
|
15
|
-
import
|
16
|
-
import
|
17
|
-
|
1
|
+
import actionOnMessageReaction from "./actionOnMessageReaction";
|
2
|
+
import createPoll from "./createPoll";
|
3
|
+
import deleteMessages from "./deleteMessages";
|
4
|
+
import editMessage from "./editMessage";
|
5
|
+
import forwardMessages from "./forwardMessages";
|
6
|
+
import getMessagesByID from "./getMessagesByID";
|
7
|
+
import getMessagesInterval from "./getMessagesInterval";
|
8
|
+
import getMessagesUpdates from "./getMessagesUpdates";
|
9
|
+
import getMessageShareUrl from "./getMessageShareUrl";
|
10
|
+
import getPollOptionVoters from "./getPollOptionVoters";
|
11
|
+
import getPollStatus from "./getPollStatus";
|
12
|
+
import requestSendFile from "./requestSendFile";
|
13
|
+
import sendDocument from "./sendDocument";
|
14
|
+
import sendGif from "./sendGif";
|
15
|
+
import sendMessage from "./sendMessage";
|
16
|
+
import sendMusic from "./sendMusic";
|
17
|
+
import sendPhoto from "./sendPhoto";
|
18
|
+
import sendSticker from "./sendSticker";
|
19
|
+
import sendVideo from "./sendVideo";
|
20
|
+
import sendVideoMessage from "./sendVideoMessage";
|
21
|
+
import sendVoice from "./sendVoice";
|
22
|
+
import setPinMessage from "./setPinMessage";
|
23
|
+
import votePoll from "./votePoll";
|
24
|
+
import sendText from "./sendText";
|
25
|
+
import getMessages from "./getMessages";
|
26
|
+
export { actionOnMessageReaction, createPoll, deleteMessages, editMessage, forwardMessages, getMessagesByID, getMessagesInterval, getMessagesUpdates, getMessageShareUrl, getPollOptionVoters, getPollStatus, requestSendFile, sendDocument, sendGif, sendMessage, sendMusic, sendPhoto, sendSticker, sendVideo, sendVideoMessage, sendVoice, setPinMessage, votePoll, sendText, getMessages };
|
@@ -3,36 +3,54 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.
|
7
|
-
const
|
8
|
-
exports.
|
9
|
-
const
|
10
|
-
exports.
|
11
|
-
const
|
12
|
-
exports.
|
13
|
-
const
|
14
|
-
exports.
|
15
|
-
const
|
16
|
-
exports.
|
17
|
-
const
|
18
|
-
exports.
|
19
|
-
const
|
20
|
-
exports.
|
21
|
-
const
|
22
|
-
exports.
|
23
|
-
const
|
24
|
-
exports.
|
25
|
-
const
|
26
|
-
exports.
|
27
|
-
const
|
28
|
-
exports.
|
29
|
-
const
|
30
|
-
exports.
|
31
|
-
const
|
32
|
-
exports.
|
33
|
-
const
|
34
|
-
exports.
|
35
|
-
const
|
36
|
-
exports.
|
37
|
-
const
|
38
|
-
exports.
|
6
|
+
exports.getMessages = exports.sendText = exports.votePoll = exports.setPinMessage = exports.sendVoice = exports.sendVideoMessage = exports.sendVideo = exports.sendSticker = exports.sendPhoto = exports.sendMusic = exports.sendMessage = exports.sendGif = exports.sendDocument = exports.requestSendFile = exports.getPollStatus = exports.getPollOptionVoters = exports.getMessageShareUrl = exports.getMessagesUpdates = exports.getMessagesInterval = exports.getMessagesByID = exports.forwardMessages = exports.editMessage = exports.deleteMessages = exports.createPoll = exports.actionOnMessageReaction = void 0;
|
7
|
+
const actionOnMessageReaction_1 = __importDefault(require("./actionOnMessageReaction"));
|
8
|
+
exports.actionOnMessageReaction = actionOnMessageReaction_1.default;
|
9
|
+
const createPoll_1 = __importDefault(require("./createPoll"));
|
10
|
+
exports.createPoll = createPoll_1.default;
|
11
|
+
const deleteMessages_1 = __importDefault(require("./deleteMessages"));
|
12
|
+
exports.deleteMessages = deleteMessages_1.default;
|
13
|
+
const editMessage_1 = __importDefault(require("./editMessage"));
|
14
|
+
exports.editMessage = editMessage_1.default;
|
15
|
+
const forwardMessages_1 = __importDefault(require("./forwardMessages"));
|
16
|
+
exports.forwardMessages = forwardMessages_1.default;
|
17
|
+
const getMessagesByID_1 = __importDefault(require("./getMessagesByID"));
|
18
|
+
exports.getMessagesByID = getMessagesByID_1.default;
|
19
|
+
const getMessagesInterval_1 = __importDefault(require("./getMessagesInterval"));
|
20
|
+
exports.getMessagesInterval = getMessagesInterval_1.default;
|
21
|
+
const getMessagesUpdates_1 = __importDefault(require("./getMessagesUpdates"));
|
22
|
+
exports.getMessagesUpdates = getMessagesUpdates_1.default;
|
23
|
+
const getMessageShareUrl_1 = __importDefault(require("./getMessageShareUrl"));
|
24
|
+
exports.getMessageShareUrl = getMessageShareUrl_1.default;
|
25
|
+
const getPollOptionVoters_1 = __importDefault(require("./getPollOptionVoters"));
|
26
|
+
exports.getPollOptionVoters = getPollOptionVoters_1.default;
|
27
|
+
const getPollStatus_1 = __importDefault(require("./getPollStatus"));
|
28
|
+
exports.getPollStatus = getPollStatus_1.default;
|
29
|
+
const requestSendFile_1 = __importDefault(require("./requestSendFile"));
|
30
|
+
exports.requestSendFile = requestSendFile_1.default;
|
31
|
+
const sendDocument_1 = __importDefault(require("./sendDocument"));
|
32
|
+
exports.sendDocument = sendDocument_1.default;
|
33
|
+
const sendGif_1 = __importDefault(require("./sendGif"));
|
34
|
+
exports.sendGif = sendGif_1.default;
|
35
|
+
const sendMessage_1 = __importDefault(require("./sendMessage"));
|
36
|
+
exports.sendMessage = sendMessage_1.default;
|
37
|
+
const sendMusic_1 = __importDefault(require("./sendMusic"));
|
38
|
+
exports.sendMusic = sendMusic_1.default;
|
39
|
+
const sendPhoto_1 = __importDefault(require("./sendPhoto"));
|
40
|
+
exports.sendPhoto = sendPhoto_1.default;
|
41
|
+
const sendSticker_1 = __importDefault(require("./sendSticker"));
|
42
|
+
exports.sendSticker = sendSticker_1.default;
|
43
|
+
const sendVideo_1 = __importDefault(require("./sendVideo"));
|
44
|
+
exports.sendVideo = sendVideo_1.default;
|
45
|
+
const sendVideoMessage_1 = __importDefault(require("./sendVideoMessage"));
|
46
|
+
exports.sendVideoMessage = sendVideoMessage_1.default;
|
47
|
+
const sendVoice_1 = __importDefault(require("./sendVoice"));
|
48
|
+
exports.sendVoice = sendVoice_1.default;
|
49
|
+
const setPinMessage_1 = __importDefault(require("./setPinMessage"));
|
50
|
+
exports.setPinMessage = setPinMessage_1.default;
|
51
|
+
const votePoll_1 = __importDefault(require("./votePoll"));
|
52
|
+
exports.votePoll = votePoll_1.default;
|
53
|
+
const sendText_1 = __importDefault(require("./sendText"));
|
54
|
+
exports.sendText = sendText_1.default;
|
55
|
+
const getMessages_1 = __importDefault(require("./getMessages"));
|
56
|
+
exports.getMessages = getMessages_1.default;
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function
|
12
|
+
function requestSendFile(file_name_1, size_1) {
|
13
13
|
return __awaiter(this, arguments, void 0, function* (file_name, size, mime = null) {
|
14
14
|
const input = {
|
15
15
|
file_name: file_name,
|
@@ -19,4 +19,4 @@ function request_send_file(file_name_1, size_1) {
|
|
19
19
|
return yield this.builder("requestSendFile", input);
|
20
20
|
});
|
21
21
|
}
|
22
|
-
exports.default =
|
22
|
+
exports.default = requestSendFile;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import Client from "../..";
|
2
|
+
declare function sendDocument(this: Client, object_guid: string, document: string | Buffer<ArrayBufferLike>, caption?: string, reply_to_message_id?: string, auto_delete?: number): Promise<import("../../types/messages").SendMessageResult>;
|
3
|
+
export default sendDocument;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function sendDocument(object_guid, document, caption, reply_to_message_id, auto_delete) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.sendMessage(object_guid, caption, reply_to_message_id, document, "File", null, null, null, auto_delete);
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = sendDocument;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import Client from '../..';
|
2
|
+
declare function sendGif(this: Client, object_guid: string, gif: string | Buffer<ArrayBufferLike>, caption?: string, reply_to_message_id?: string, auto_delete?: number): Promise<import("../../types/messages").SendMessageResult>;
|
3
|
+
export default sendGif;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function sendGif(object_guid, gif, caption, reply_to_message_id, auto_delete) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.sendMessage(object_guid, caption, reply_to_message_id, gif, "Gif", null, true, null, auto_delete);
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = sendGif;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import Client from "../..";
|
2
|
+
declare function sendMessage(this: Client, object_guid: string, text?: string | null, reply_to_message_id?: string | null, file_inline?: Buffer | string | null, type?: string, is_spoil?: boolean, thumb?: boolean | string, audio_info?: boolean, auto_delete?: number): Promise<any>;
|
3
|
+
export default sendMessage;
|
@@ -47,26 +47,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
48
48
|
const fs = __importStar(require("fs"));
|
49
49
|
const music_metadata_1 = require("music-metadata");
|
50
|
-
const
|
51
|
-
|
50
|
+
const utilities_1 = require("../utilities");
|
51
|
+
const parser_1 = __importDefault(require("../../parser"));
|
52
|
+
function sendMessage(object_guid_1) {
|
52
53
|
return __awaiter(this, arguments, void 0, function* (object_guid, text = null, reply_to_message_id = null, file_inline = null, type = "File", is_spoil = false, thumb = true, audio_info = false, auto_delete) {
|
53
54
|
if (["me", "cloud", "self"].includes(object_guid.toLowerCase())) {
|
54
55
|
object_guid = this.userGuid;
|
55
56
|
}
|
57
|
+
let duration = 5000;
|
58
|
+
let file_uploaded;
|
59
|
+
let fileName = null;
|
60
|
+
let audio_data;
|
56
61
|
let input = {
|
57
62
|
object_guid,
|
58
|
-
reply_to_message_id,
|
59
63
|
rnd: Math.floor(Math.random() * 1e6 + 1),
|
64
|
+
reply_to_message_id,
|
60
65
|
};
|
61
66
|
if (text)
|
62
|
-
input
|
63
|
-
let file_uploaded;
|
64
|
-
let fileName = null;
|
65
|
-
let audio_data;
|
67
|
+
input = Object.assign(Object.assign({}, input), parser_1.default.toMetadata(text));
|
66
68
|
if (file_inline) {
|
67
69
|
if (typeof file_inline === "string") {
|
68
70
|
fileName = file_inline;
|
69
|
-
console.log(fileName);
|
70
71
|
if (!fs.existsSync(fileName)) {
|
71
72
|
throw new Error("File not found in the given path");
|
72
73
|
}
|
@@ -78,22 +79,30 @@ function send_message(object_guid_1) {
|
|
78
79
|
}
|
79
80
|
if (file_inline && Buffer.isBuffer(file_inline)) {
|
80
81
|
if (!fileName) {
|
81
|
-
|
82
|
-
|
82
|
+
if (["Music", "Voice"].includes(type))
|
83
|
+
fileName = `file_${new Date().toDateString()}.mp3`;
|
84
|
+
else if (["Video", "Gif", "VideoMessage"].includes(type))
|
85
|
+
fileName = `file_${new Date().toDateString()}.mp4`;
|
86
|
+
else if (type === "Image")
|
87
|
+
fileName = `file_${new Date().toDateString()}.jpg`;
|
88
|
+
else
|
89
|
+
fileName = `file_${new Date().toDateString()}.zip`;
|
83
90
|
}
|
84
91
|
if (["Music", "Voice"].includes(type)) {
|
85
92
|
thumb = false;
|
86
93
|
if (audio_info) {
|
87
94
|
audio_data = yield (0, music_metadata_1.parseBuffer)(file_inline);
|
95
|
+
duration = audio_data.format.duration || 5000;
|
88
96
|
}
|
89
97
|
}
|
90
98
|
if (thumb) {
|
91
99
|
try {
|
92
100
|
if (["Video", "Gif", "VideoMessage"].includes(type)) {
|
93
|
-
thumb = yield
|
101
|
+
thumb = yield utilities_1.thumbnail.fromVideo(fileName);
|
102
|
+
duration = (yield utilities_1.thumbnail.getTime(fileName)) * 1000 || 5000;
|
94
103
|
}
|
95
104
|
else if (type === "Image") {
|
96
|
-
thumb = yield
|
105
|
+
thumb = yield utilities_1.thumbnail.fromImage(fileName);
|
97
106
|
}
|
98
107
|
}
|
99
108
|
catch (error) {
|
@@ -101,34 +110,37 @@ function send_message(object_guid_1) {
|
|
101
110
|
thumb = false;
|
102
111
|
}
|
103
112
|
}
|
104
|
-
file_uploaded = yield this.network.
|
105
|
-
// await fs.promises.unlink(fileName);
|
113
|
+
file_uploaded = yield this.network.uploadFile(fileName);
|
106
114
|
if (type === "VideoMessage")
|
107
115
|
file_uploaded["is_round"] = true;
|
108
116
|
file_uploaded["type"] = type === "VideoMessage" ? "Video" : type;
|
109
|
-
|
117
|
+
if (is_spoil)
|
118
|
+
file_uploaded["is_spoil"] = is_spoil;
|
110
119
|
if (thumb) {
|
111
|
-
|
120
|
+
if (type !== "Image") {
|
121
|
+
file_uploaded["time"] = duration;
|
122
|
+
}
|
112
123
|
file_uploaded["width"] = 320;
|
113
124
|
file_uploaded["height"] = 320;
|
114
125
|
file_uploaded["thumb_inline"] = thumb;
|
115
126
|
}
|
116
127
|
if (audio_info) {
|
117
|
-
file_uploaded["music_performer"] = audio_data.common.title || "
|
118
|
-
file_uploaded["time"] = audio_data.format.duration ||
|
128
|
+
file_uploaded["music_performer"] = audio_data.common.title || "RubJS";
|
129
|
+
file_uploaded["time"] = audio_data.format.duration || 5000;
|
119
130
|
}
|
120
131
|
}
|
121
132
|
if (file_inline) {
|
122
133
|
input["file_inline"] = file_uploaded;
|
123
134
|
}
|
135
|
+
console.log(input);
|
124
136
|
const result = yield this.builder("sendMessage", input);
|
125
137
|
if (auto_delete) {
|
126
138
|
const res = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
127
|
-
yield this.
|
139
|
+
yield this.deleteMessages(result.message_update.object_guid, result.message_update.message_id);
|
128
140
|
clearTimeout(res);
|
129
141
|
}), auto_delete * 1000);
|
130
142
|
}
|
131
143
|
return result;
|
132
144
|
});
|
133
145
|
}
|
134
|
-
exports.default =
|
146
|
+
exports.default = sendMessage;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import Client from "../..";
|
2
|
+
declare function sendMusic(this: Client, object_guid: string, music: string | Buffer<ArrayBufferLike>, caption?: string, reply_to_message_id?: string, is_spoil?: boolean, audio_info?: boolean, auto_delete?: number): Promise<import("../../types/messages").SendMessageResult>;
|
3
|
+
export default sendMusic;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function sendMusic(object_guid, music, caption, reply_to_message_id, is_spoil, audio_info, auto_delete) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.sendMessage(object_guid, caption, reply_to_message_id, music, "Music", is_spoil, null, audio_info, auto_delete);
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = sendMusic;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import Client from "../..";
|
2
|
+
declare function sendPhoto(this: Client, object_guid: string, photo: Buffer<ArrayBufferLike> | string, text?: string, reply_id?: string, is_spoil?: boolean, auto_delete?: number): Promise<import("../../types/messages").SendMessageResult>;
|
3
|
+
export default sendPhoto;
|