rubjs 3.0.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -5
- package/lib/clients/loginClient.js +3 -3
- package/lib/clients/network_login.js +1 -1
- package/lib/core/bot/bot.d.ts +25 -0
- package/lib/core/bot/bot.js +57 -0
- package/lib/core/bot/contexts/inline.context.d.ts +16 -0
- package/lib/core/bot/contexts/inline.context.js +27 -0
- package/lib/core/bot/contexts/message.context.d.ts +17 -0
- package/lib/core/bot/contexts/message.context.js +39 -0
- package/lib/core/bot/filters.d.ts +14 -0
- package/lib/core/bot/filters.js +45 -0
- package/lib/core/bot/methods/advanced/builder.d.ts +3 -0
- package/lib/core/bot/methods/advanced/builder.js +15 -0
- package/lib/core/bot/methods/bot/getMe.d.ts +3 -0
- package/lib/core/bot/methods/bot/getMe.js +6 -0
- package/lib/core/bot/methods/bot/index.d.ts +2 -0
- package/lib/core/bot/methods/bot/index.js +8 -0
- package/lib/core/bot/methods/chat/getChat.d.ts +3 -0
- package/lib/core/bot/methods/chat/getChat.js +6 -0
- package/lib/core/bot/methods/chat/index.d.ts +2 -0
- package/lib/core/bot/methods/chat/index.js +8 -0
- package/lib/core/bot/methods/files/getFile.d.ts +3 -0
- package/lib/core/bot/methods/files/getFile.js +6 -0
- package/lib/core/bot/methods/files/index.d.ts +4 -0
- package/lib/core/bot/methods/files/index.js +12 -0
- package/lib/core/bot/methods/files/requestSendFile.d.ts +4 -0
- package/lib/core/bot/methods/files/requestSendFile.js +6 -0
- package/lib/core/bot/methods/files/uploadFile.d.ts +3 -0
- package/lib/core/bot/methods/files/uploadFile.js +32 -0
- package/lib/core/bot/methods/index.d.ts +34 -0
- package/lib/core/bot/methods/index.js +116 -0
- package/lib/core/bot/methods/messages/deleteMessage.d.ts +3 -0
- package/lib/core/bot/methods/messages/deleteMessage.js +9 -0
- package/lib/core/bot/methods/messages/editChatKeypad.d.ts +4 -0
- package/lib/core/bot/methods/messages/editChatKeypad.js +12 -0
- package/lib/core/bot/methods/messages/editMessageKeypad.d.ts +4 -0
- package/lib/core/bot/methods/messages/editMessageKeypad.js +11 -0
- package/lib/core/bot/methods/messages/editMessageText.d.ts +3 -0
- package/lib/core/bot/methods/messages/editMessageText.js +10 -0
- package/lib/core/bot/methods/messages/forwardMessage.d.ts +3 -0
- package/lib/core/bot/methods/messages/forwardMessage.js +11 -0
- package/lib/core/bot/methods/messages/index.d.ts +10 -0
- package/lib/core/bot/methods/messages/index.js +24 -0
- package/lib/core/bot/methods/messages/sendContact.d.ts +4 -0
- package/lib/core/bot/methods/messages/sendContact.js +24 -0
- package/lib/core/bot/methods/messages/sendLocation.d.ts +4 -0
- package/lib/core/bot/methods/messages/sendLocation.js +23 -0
- package/lib/core/bot/methods/messages/sendMessage.d.ts +4 -0
- package/lib/core/bot/methods/messages/sendMessage.js +22 -0
- package/lib/core/bot/methods/messages/sendPoll.d.ts +3 -0
- package/lib/core/bot/methods/messages/sendPoll.js +6 -0
- package/lib/core/bot/methods/settings/index.d.ts +3 -0
- package/lib/core/bot/methods/settings/index.js +10 -0
- package/lib/core/bot/methods/settings/setCommands.d.ts +4 -0
- package/lib/core/bot/methods/settings/setCommands.js +6 -0
- package/lib/core/bot/methods/settings/updateBotEndpoints.d.ts +4 -0
- package/lib/core/bot/methods/settings/updateBotEndpoints.js +9 -0
- package/lib/core/bot/methods/utilities/getUpdates.d.ts +3 -0
- package/lib/core/bot/methods/utilities/getUpdates.js +6 -0
- package/lib/core/bot/methods/utilities/handleUpdates.d.ts +4 -0
- package/lib/core/bot/methods/utilities/handleUpdates.js +41 -0
- package/lib/core/bot/methods/utilities/index.d.ts +5 -0
- package/lib/core/bot/methods/utilities/index.js +14 -0
- package/lib/core/bot/methods/utilities/run.d.ts +4 -0
- package/lib/core/bot/methods/utilities/run.js +13 -0
- package/lib/core/bot/methods/utilities/start.d.ts +3 -0
- package/lib/core/bot/methods/utilities/start.js +27 -0
- package/lib/core/bot/methods/utilities/webhook.d.ts +4 -0
- package/lib/core/bot/methods/utilities/webhook.js +57 -0
- package/lib/core/bot/network/index.d.ts +9 -0
- package/lib/core/bot/network/index.js +49 -0
- package/lib/core/bot/network/polling.d.ts +0 -0
- package/lib/core/bot/network/polling.js +44 -0
- package/lib/core/bot/types/bot.type.d.ts +28 -0
- package/lib/core/bot/types/models.d.ts +303 -0
- package/lib/core/bot/types/models.js +131 -0
- package/lib/core/{client.d.ts → client/client.d.ts} +4 -4
- package/lib/core/{client.js → client/client.js} +2 -2
- package/lib/core/{context → client/contexts}/activities.type.d.ts +2 -2
- package/lib/core/{context → client/contexts}/chat.type.d.ts +2 -2
- package/lib/core/{context → client/contexts}/message.type.d.ts +2 -2
- package/lib/core/{context → client/contexts}/notifications.type.d.ts +2 -2
- package/lib/core/{filters.d.ts → client/filters.d.ts} +3 -3
- package/lib/core/{filters.js → client/filters.js} +27 -27
- package/lib/core/client/methods/advanced/index.d.ts +2 -0
- package/lib/core/client/methods/advanced/index.js +8 -0
- package/lib/core/{methods → client/methods}/extras/onEditMessages.d.ts +1 -1
- package/lib/core/{methods → client/methods}/utilities/download.d.ts +1 -1
- package/lib/core/{methods → client/methods}/utilities/start.js +2 -2
- package/lib/core/{methods → client/methods}/utilities/usePlugin.d.ts +1 -1
- package/lib/core/{network → client/network}/index.d.ts +1 -1
- package/lib/core/{network → client/network}/websocket.js +13 -29
- package/lib/{types → core/client/types}/client.type.d.ts +5 -5
- package/lib/core/client/types/session.type.d.ts +11 -0
- package/lib/core/client/types/session.type.js +2 -0
- package/lib/exceptions/index.d.ts +6 -0
- package/lib/exceptions/index.js +16 -0
- package/lib/index.d.ts +11 -9
- package/lib/index.js +11 -5
- package/lib/utils/checkFilters.d.ts +1 -0
- package/lib/utils/checkFilters.js +20 -0
- package/lib/{core → utils}/session.d.ts +4 -2
- package/lib/{core → utils}/session.js +27 -11
- package/package.json +54 -43
- package/lib/types/session.type.d.ts +0 -7
- /package/lib/core/{methods → bot/methods}/advanced/index.d.ts +0 -0
- /package/lib/core/{methods → bot/methods}/advanced/index.js +0 -0
- /package/lib/{types/client.type.js → core/bot/types/bot.type.js} +0 -0
- /package/lib/core/{context → client/contexts}/activities.type.js +0 -0
- /package/lib/core/{context → client/contexts}/chat.type.js +0 -0
- /package/lib/core/{context → client/contexts}/contextConstructors.d.ts +0 -0
- /package/lib/core/{context → client/contexts}/contextConstructors.js +0 -0
- /package/lib/core/{context → client/contexts}/index.d.ts +0 -0
- /package/lib/core/{context → client/contexts}/index.js +0 -0
- /package/lib/core/{context → client/contexts}/message.type.js +0 -0
- /package/lib/core/{context → client/contexts}/notifications.type.js +0 -0
- /package/lib/core/{crypto.d.ts → client/crypto.d.ts} +0 -0
- /package/lib/core/{crypto.js → client/crypto.js} +0 -0
- /package/lib/core/{methods → client/methods}/advanced/builder.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/advanced/builder.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/index.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/logout.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/logout.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/registerDevice.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/registerDevice.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/sendCode.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/sendCode.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/signIn.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/signIn.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/addChannel.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/addChannel.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/addChannelMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/addChannelMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/banChannelMember.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/banChannelMember.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/cancelChangeObjectOwner.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/cancelChangeObjectOwner.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/channelPreviewByJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/channelPreviewByJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/checkChannelUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/checkChannelUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/createChannelVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/createChannelVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/discardChannelVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/discardChannelVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/editChannelInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/editChannelInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getBannedChannelMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getBannedChannelMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAdminAccessList.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAdminAccessList.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAdminMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAdminMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAllMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAllMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelLink.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getPendingObjectOwner.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getPendingObjectOwner.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/index.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/joinChannelAction.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/joinChannelAction.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/joinChannelByLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/joinChannelByLink.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/leaveChannelVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/leaveChannelVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/removeChannel.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/removeChannel.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/requestChangeObjectOwner.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/requestChangeObjectOwner.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/seenChannelMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/seenChannelMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/setChannelLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/setChannelLink.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/setChannelVoiceChatSetting.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/setChannelVoiceChatSetting.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/updateChannelUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/updateChannelUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/actionOnJoinRequest.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/actionOnJoinRequest.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/addLiveComment.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/addLiveComment.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/clickMessageUrl.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/clickMessageUrl.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/createJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/createJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/deleteAvatar.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/deleteAvatar.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/deleteChatHistory.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/deleteChatHistory.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/editJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/editJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getAbsObjects.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getAbsObjects.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getAvatars.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getAvatars.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChatReaction.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChatReaction.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChats.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChats.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChatsUpdates.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChatsUpdates.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getJoinLinks.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getJoinLinks.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getJoinRequests.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getJoinRequests.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLinkFromAppUrl.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLinkFromAppUrl.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLiveComments.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLiveComments.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLivePlayUrl.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLivePlayUrl.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLiveStatus.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLiveStatus.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getObjectInfoByUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getObjectInfoByUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getTopChatUsers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getTopChatUsers.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/index.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/removeFromTopChatUsers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/removeFromTopChatUsers.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/removeJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/removeJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/searchChatMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/searchChatMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/searchGlobalMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/searchGlobalMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/seenChats.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/seenChats.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/sendChatActivity.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/sendChatActivity.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/sendLive.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/sendLive.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/setActionChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/setActionChat.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/uploadAvatar.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/uploadAvatar.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/addAddressBook.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/addAddressBook.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/deleteContact.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/deleteContact.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContacts.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContacts.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContactsLastOnline.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContactsLastOnline.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContactsUpdates.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContactsUpdates.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/index.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/resetContacts.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/resetContacts.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/banMember.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/banMember.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/deleteMessagebyCount.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/deleteMessagebyCount.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getObjectByUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getObjectByUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getProfileLinkItems.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getProfileLinkItems.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getRelatedObjects.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getRelatedObjects.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getTranscription.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getTranscription.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/index.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/join.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/join.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/joinVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/joinVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/leaveChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/leaveChat.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/onEditMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/reportObject.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/reportObject.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/searchGlobalObjects.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/searchGlobalObjects.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/sendVoiceChatActivity.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/sendVoiceChatActivity.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/setVoiceChatState.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/setVoiceChatState.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/transcribeVoice.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/transcribeVoice.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/userIsAdmin.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/userIsAdmin.js +0 -0
- /package/lib/core/{methods → client/methods}/gif/addToMyGifSet.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/gif/addToMyGifSet.js +0 -0
- /package/lib/core/{methods → client/methods}/gif/getMyGifSet.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/gif/getMyGifSet.js +0 -0
- /package/lib/core/{methods → client/methods}/gif/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/gif/index.js +0 -0
- /package/lib/core/{methods → client/methods}/gif/removeFromMyGifSet.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/gif/removeFromMyGifSet.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/addGroup.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/addGroup.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/addGroupMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/addGroupMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/banGroupMember.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/banGroupMember.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/createGroupVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/createGroupVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/deleteNoAccessGroupChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/deleteNoAccessGroupChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/discardGroupVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/discardGroupVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/editGroupInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/editGroupInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getBannedGroupMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getBannedGroupMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAdminAccessList.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAdminAccessList.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAdminMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAdminMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAllMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAllMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupDefaultAccess.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupDefaultAccess.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupLink.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupMentionList.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupMentionList.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupOnlineCount.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupOnlineCount.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupVoiceChatParticipants.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupVoiceChatParticipants.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupVoiceChatUpdates.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupVoiceChatUpdates.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/groupPreviewByJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/groupPreviewByJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/index.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/joinGroup.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/joinGroup.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/joinGroupVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/joinGroupVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/leaveGroup.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/leaveGroup.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/leaveGroupVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/leaveGroupVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/removeGroup.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/removeGroup.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/seenGroupMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/seenGroupMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupAdmin.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupAdmin.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupDefaultAccess.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupDefaultAccess.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupLink.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupVoiceChatSetting.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupVoiceChatSetting.js +0 -0
- /package/lib/core/{methods → client/methods}/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/index.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/actionOnMessageReaction.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/actionOnMessageReaction.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/createPoll.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/createPoll.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/deleteMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/deleteMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/editMessage.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/editMessage.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/forwardMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/forwardMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessageShareUrl.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessageShareUrl.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesByID.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesByID.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesInterval.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesInterval.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesUpdates.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesUpdates.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getPollOptionVoters.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getPollOptionVoters.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getPollStatus.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getPollStatus.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/index.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendDocument.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendDocument.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendFileInline.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendFileInline.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendGif.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendGif.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendMessage.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendMessage.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendMusic.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendMusic.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendPhoto.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendPhoto.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendSticker.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendSticker.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendText.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendText.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVideo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVideo.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVideoMessage.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVideoMessage.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVoice.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVoice.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/setPinMessage.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/setPinMessage.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/votePoll.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/votePoll.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/changePassword.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/changePassword.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/checkTwoStepPasscode.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/checkTwoStepPasscode.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/deleteFolder.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/deleteFolder.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getBlockedUsers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getBlockedUsers.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getFolders.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getFolders.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getMySessions.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getMySessions.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getPrivacySetting.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getPrivacySetting.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getSuggestedFolders.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getSuggestedFolders.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getTwoPasscodeStatus.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getTwoPasscodeStatus.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/index.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/requestRecoveryEmail.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/requestRecoveryEmail.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/setSetting.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/setSetting.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/setupTwoStepVerification.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/setupTwoStepVerification.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/terminateOtherSessions.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/terminateOtherSessions.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/terminateSession.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/terminateSession.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/turnOffTwoStep.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/turnOffTwoStep.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/updateProfile.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/updateProfile.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/updateUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/updateUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/verifyRecoveryEmail.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/verifyRecoveryEmail.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/actionOnStickerSet.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/actionOnStickerSet.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getMyStickerSets.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getMyStickerSets.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickerSetByID.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickerSetByID.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickersByEmoji.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickersByEmoji.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickersBySetIds.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickersBySetIds.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getTrendStickerSets.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getTrendStickerSets.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/index.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/searchStickers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/searchStickers.js +0 -0
- /package/lib/core/{methods → client/methods}/users/checkUserUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/checkUserUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/users/deleteUserChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/deleteUserChat.js +0 -0
- /package/lib/core/{methods → client/methods}/users/getMe.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/getMe.js +0 -0
- /package/lib/core/{methods → client/methods}/users/getUserInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/getUserInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/users/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/index.js +0 -0
- /package/lib/core/{methods → client/methods}/users/setBlockUser.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/setBlockUser.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/download.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/downloadProfilePicture.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/downloadProfilePicture.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/index.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/requestSendFile.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/requestSendFile.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/run.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/run.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/start.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/thumbnail.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/thumbnail.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/usePlugin.js +0 -0
- /package/lib/core/{network → client/network}/api.d.ts +0 -0
- /package/lib/core/{network → client/network}/api.js +0 -0
- /package/lib/core/{network → client/network}/file.d.ts +0 -0
- /package/lib/core/{network → client/network}/file.js +0 -0
- /package/lib/core/{network → client/network}/index.js +0 -0
- /package/lib/core/{network → client/network}/utils.d.ts +0 -0
- /package/lib/core/{network → client/network}/utils.js +0 -0
- /package/lib/core/{network → client/network}/websocket.d.ts +0 -0
- /package/lib/core/{parser.d.ts → client/parser.d.ts} +0 -0
- /package/lib/core/{parser.js → client/parser.js} +0 -0
- /package/lib/{types/decorators.type.js → core/client/types/client.type.js} +0 -0
- /package/lib/{types → core/client/types}/decorators.type.d.ts +0 -0
- /package/lib/{types/network.type.js → core/client/types/decorators.type.js} +0 -0
- /package/lib/{types → core/client/types}/index.type.d.ts +0 -0
- /package/lib/{types → core/client/types}/index.type.js +0 -0
- /package/lib/{types → core/client/types}/network.type.d.ts +0 -0
- /package/lib/{types/session.type.js → core/client/types/network.type.js} +0 -0
package/README.md
CHANGED
@@ -15,18 +15,39 @@
|
|
15
15
|
|
16
16
|
---
|
17
17
|
|
18
|
-
##
|
18
|
+
## نمونه کد اولیه برای سلف
|
19
19
|
|
20
20
|
```js
|
21
|
-
const { Client,
|
21
|
+
const { Client, ClientFilters } = require("rubjs");
|
22
22
|
|
23
|
-
const
|
23
|
+
const client = new Client("rubjs");
|
24
24
|
|
25
|
-
|
25
|
+
client.command("/admin", [ClientFilters.isPrivate], async (ctx) => {
|
26
26
|
await ctx.reply("شما ادمین هستید ✅");
|
27
27
|
});
|
28
28
|
|
29
|
-
|
29
|
+
client.on("message", [ClientFilters.isGroup], async (ctx) => {
|
30
|
+
await ctx.reply("سلام");
|
31
|
+
});
|
32
|
+
|
33
|
+
client.run();
|
34
|
+
```
|
35
|
+
|
36
|
+
---
|
37
|
+
|
38
|
+
|
39
|
+
## نمونه کد اولیه برای ربات
|
40
|
+
|
41
|
+
```js
|
42
|
+
const { Bot, BotFilters } = require("rubjs");
|
43
|
+
|
44
|
+
const bot = new Bot("rubjs");
|
45
|
+
|
46
|
+
bot.command("/start", async (ctx) => {
|
47
|
+
await ctx.reply("ربات استارت شد.");
|
48
|
+
});
|
49
|
+
|
50
|
+
bot.on("message", [Filters.isText], async (ctx) => {
|
30
51
|
await ctx.reply("سلام");
|
31
52
|
});
|
32
53
|
|
@@ -3,9 +3,9 @@ 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
|
-
const crypto_1 = __importDefault(require("../core/crypto"));
|
6
|
+
const crypto_1 = __importDefault(require("../core/client/crypto"));
|
7
7
|
const network_login_1 = __importDefault(require("./network_login"));
|
8
|
-
const session_1 = __importDefault(require("../
|
8
|
+
const session_1 = __importDefault(require("../utils/session"));
|
9
9
|
class LoginClient {
|
10
10
|
static async sendCode(phone_number, pass_key) {
|
11
11
|
const network = new network_login_1.default();
|
@@ -64,7 +64,7 @@ class LoginClient {
|
|
64
64
|
private_key: privateKey,
|
65
65
|
};
|
66
66
|
if (sessionPath) {
|
67
|
-
const session = new session_1.default(sessionPath);
|
67
|
+
const session = new session_1.default(sessionPath, undefined, 'CLIENT');
|
68
68
|
session.saveSession(sessionData);
|
69
69
|
}
|
70
70
|
return { isOk: true, status: 'Sucessfull', sessionData };
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const undici_1 = require("undici");
|
7
|
-
const crypto_1 = __importDefault(require("../core/crypto"));
|
7
|
+
const crypto_1 = __importDefault(require("../core/client/crypto"));
|
8
8
|
class Network {
|
9
9
|
constructor() {
|
10
10
|
this.apiUrl = null;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import SessionManager from '../../utils/session';
|
2
|
+
import Message from './contexts/message.context';
|
3
|
+
import Methods from './methods';
|
4
|
+
import Network from './network';
|
5
|
+
import { BotType, ContextMap, Handler, NestedFilter, SessionType } from './types/bot.type';
|
6
|
+
import { FastifyInstance } from 'fastify';
|
7
|
+
declare class Bot extends Methods {
|
8
|
+
token: SessionType;
|
9
|
+
BASE_URL: string;
|
10
|
+
protected sessionDB: SessionManager;
|
11
|
+
protected initialize: boolean;
|
12
|
+
protected network: Network;
|
13
|
+
sendToken: string;
|
14
|
+
handlers: {
|
15
|
+
[K in keyof ContextMap]: Handler<ContextMap[K]>[];
|
16
|
+
};
|
17
|
+
server: FastifyInstance;
|
18
|
+
bot?: BotType;
|
19
|
+
constructor(token: SessionType);
|
20
|
+
on<T extends keyof typeof this.handlers>(type: T, handler: (ctx: ContextMap[T]) => Promise<void>): void;
|
21
|
+
on<T extends keyof typeof this.handlers>(type: T, filters: NestedFilter<ContextMap[T]>, handler: (ctx: ContextMap[T]) => Promise<void>): void;
|
22
|
+
command(prefix: string | RegExp, handler: (ctx: Message) => Promise<void>): void;
|
23
|
+
command(prefix: string | RegExp, filters: NestedFilter<ContextMap['message']>, handler: (ctx: Message) => Promise<void>): void;
|
24
|
+
}
|
25
|
+
export default Bot;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const session_1 = __importDefault(require("../../utils/session"));
|
7
|
+
const methods_1 = __importDefault(require("./methods"));
|
8
|
+
const network_1 = __importDefault(require("./network"));
|
9
|
+
const fastify_1 = __importDefault(require("fastify"));
|
10
|
+
class Bot extends methods_1.default {
|
11
|
+
constructor(token) {
|
12
|
+
super();
|
13
|
+
this.token = token;
|
14
|
+
this.BASE_URL = `https://botapi.rubika.ir/v3`;
|
15
|
+
this.initialize = false;
|
16
|
+
this.sendToken = '';
|
17
|
+
this.handlers = { inline: [], message: [] };
|
18
|
+
this.sessionDB = new session_1.default(token, undefined, 'BOT');
|
19
|
+
this.network = new network_1.default(this);
|
20
|
+
this.server = (0, fastify_1.default)();
|
21
|
+
this.start();
|
22
|
+
}
|
23
|
+
on(type, filtersOrHandler, maybeHandler) {
|
24
|
+
if (typeof filtersOrHandler === 'function') {
|
25
|
+
this.handlers[type].push({
|
26
|
+
filters: [],
|
27
|
+
handler: filtersOrHandler,
|
28
|
+
});
|
29
|
+
}
|
30
|
+
else if (Array.isArray(filtersOrHandler) && maybeHandler) {
|
31
|
+
this.handlers[type].push({
|
32
|
+
filters: filtersOrHandler,
|
33
|
+
handler: maybeHandler,
|
34
|
+
});
|
35
|
+
}
|
36
|
+
}
|
37
|
+
command(prefix, filtersOrHandler, maybeHandler) {
|
38
|
+
if (typeof filtersOrHandler === 'function') {
|
39
|
+
this.handlers.message.push({
|
40
|
+
filters: [],
|
41
|
+
handler: filtersOrHandler,
|
42
|
+
prefix,
|
43
|
+
});
|
44
|
+
}
|
45
|
+
else if (Array.isArray(filtersOrHandler) && maybeHandler) {
|
46
|
+
this.handlers.message.push({
|
47
|
+
filters: filtersOrHandler,
|
48
|
+
handler: maybeHandler,
|
49
|
+
prefix,
|
50
|
+
});
|
51
|
+
}
|
52
|
+
else {
|
53
|
+
throw new Error('Invalid arguments for command()');
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
exports.default = Bot;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Bot } from '../../..';
|
2
|
+
import { File, Location, AuxData, InlineMessage as InlineMessageType, Keypad, ChatKeypadTypeEnum, InlineKeypad } from '../types/models';
|
3
|
+
declare class InlineMessage implements InlineMessageType {
|
4
|
+
sender_id: string;
|
5
|
+
text: string;
|
6
|
+
file?: File;
|
7
|
+
location?: Location;
|
8
|
+
aux_data?: AuxData;
|
9
|
+
message_id: string;
|
10
|
+
chat_id: string;
|
11
|
+
store: Record<string, any>;
|
12
|
+
bot: Bot;
|
13
|
+
constructor(bot: Bot, update: InlineMessageType);
|
14
|
+
reply(text: string, chat_keypad?: Keypad, inline_keypad?: InlineKeypad, disable_notification?: boolean, reply_to_message_id?: string, chat_keypad_type?: ChatKeypadTypeEnum): Promise<void>;
|
15
|
+
}
|
16
|
+
export default InlineMessage;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
class InlineMessage {
|
4
|
+
constructor(bot, update) {
|
5
|
+
this.store = {};
|
6
|
+
Object.defineProperty(this, 'bot', {
|
7
|
+
value: bot,
|
8
|
+
enumerable: false,
|
9
|
+
writable: true,
|
10
|
+
configurable: true,
|
11
|
+
});
|
12
|
+
this.chat_id = update.chat_id;
|
13
|
+
this.sender_id = update.sender_id;
|
14
|
+
this.text = update.text;
|
15
|
+
if (update?.file)
|
16
|
+
this.file = update.file;
|
17
|
+
if (update?.location)
|
18
|
+
this.location = update.location;
|
19
|
+
if (update?.aux_data)
|
20
|
+
this.aux_data = update.aux_data;
|
21
|
+
this.message_id = update.message_id;
|
22
|
+
}
|
23
|
+
async reply(text, chat_keypad, inline_keypad, disable_notification = false, reply_to_message_id, chat_keypad_type) {
|
24
|
+
await this.bot.sendMessage(this.chat_id, text, chat_keypad, inline_keypad, disable_notification, reply_to_message_id, chat_keypad_type);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
exports.default = InlineMessage;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Bot } from '../../..';
|
2
|
+
import { PaymentStatus, Update, UpdateTypeEnum, Message as MessageUpdate, Keypad, ChatKeypadTypeEnum, InlineKeypad } from '../types/models';
|
3
|
+
declare class Message implements Update {
|
4
|
+
type: UpdateTypeEnum;
|
5
|
+
chat_id: string;
|
6
|
+
removed_message_id?: string;
|
7
|
+
new_message?: MessageUpdate;
|
8
|
+
updated_message?: MessageUpdate;
|
9
|
+
updated_payment?: PaymentStatus;
|
10
|
+
store: Record<string, any>;
|
11
|
+
bot: Bot;
|
12
|
+
constructor(bot: Bot, update: Update);
|
13
|
+
reply(text: string, chat_keypad?: Keypad, inline_keypad?: InlineKeypad, disable_notification?: boolean, reply_to_message_id?: string, chat_keypad_type?: ChatKeypadTypeEnum): Promise<void>;
|
14
|
+
forward(to_chat_id: string, disable_notification?: boolean): Promise<void>;
|
15
|
+
delete(): Promise<void>;
|
16
|
+
}
|
17
|
+
export default Message;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
class Message {
|
4
|
+
constructor(bot, update) {
|
5
|
+
this.store = {};
|
6
|
+
Object.defineProperty(this, 'bot', {
|
7
|
+
value: bot,
|
8
|
+
enumerable: false,
|
9
|
+
writable: true,
|
10
|
+
configurable: true,
|
11
|
+
});
|
12
|
+
this.type = update.type;
|
13
|
+
this.chat_id = update.chat_id;
|
14
|
+
if (update?.new_message)
|
15
|
+
this.new_message = update?.new_message;
|
16
|
+
if (update?.updated_message)
|
17
|
+
this.updated_message = update?.updated_message;
|
18
|
+
if (update?.updated_payment)
|
19
|
+
this.updated_payment = update?.updated_payment;
|
20
|
+
if (update.removed_message_id)
|
21
|
+
this.removed_message_id = update.removed_message_id;
|
22
|
+
}
|
23
|
+
async reply(text, chat_keypad, inline_keypad, disable_notification = false, reply_to_message_id, chat_keypad_type) {
|
24
|
+
await this.bot.sendMessage(this.chat_id, text, chat_keypad, inline_keypad, disable_notification, reply_to_message_id, chat_keypad_type);
|
25
|
+
}
|
26
|
+
async forward(to_chat_id, disable_notification = false) {
|
27
|
+
const message_id = this.new_message?.message_id || this.updated_message?.message_id;
|
28
|
+
if (!message_id)
|
29
|
+
return;
|
30
|
+
await this.bot.forwardMessage(this.chat_id, message_id, to_chat_id, disable_notification);
|
31
|
+
}
|
32
|
+
async delete() {
|
33
|
+
const message_id = this.new_message?.message_id || this.updated_message?.message_id;
|
34
|
+
if (!message_id)
|
35
|
+
return;
|
36
|
+
await this.bot.deleteMessage(this.chat_id, message_id);
|
37
|
+
}
|
38
|
+
}
|
39
|
+
exports.default = Message;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import Message from './contexts/message.context';
|
2
|
+
export default class BotFilters {
|
3
|
+
static isText(message: Message): boolean;
|
4
|
+
static isLocation(message: Message): boolean;
|
5
|
+
static isSticker(message: Message): boolean;
|
6
|
+
static isForward(message: Message): boolean;
|
7
|
+
static isReply(message: Message): boolean;
|
8
|
+
static isContact(message: Message): boolean;
|
9
|
+
static isPoll(message: Message): boolean;
|
10
|
+
static isLiveLocation(message: Message): boolean;
|
11
|
+
static isFile(message: Message): boolean;
|
12
|
+
static isDelete(message: Message): boolean;
|
13
|
+
static kypadID(button_id: string): (message: Message) => boolean;
|
14
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const filters_1 = __importDefault(require("../client/filters"));
|
7
|
+
class BotFilters {
|
8
|
+
static isText(message) {
|
9
|
+
return !!filters_1.default.findKey(message, 'text');
|
10
|
+
}
|
11
|
+
static isLocation(message) {
|
12
|
+
return !!filters_1.default.findKey(message, 'location');
|
13
|
+
}
|
14
|
+
static isSticker(message) {
|
15
|
+
return !!filters_1.default.findKey(message, 'sticker');
|
16
|
+
}
|
17
|
+
static isForward(message) {
|
18
|
+
return !!filters_1.default.findKey(message, 'forwarded_from');
|
19
|
+
}
|
20
|
+
static isReply(message) {
|
21
|
+
return !!filters_1.default.findKey(message, 'reply_to_message_id');
|
22
|
+
}
|
23
|
+
static isContact(message) {
|
24
|
+
return !!filters_1.default.findKey(message, 'contact_message');
|
25
|
+
}
|
26
|
+
static isPoll(message) {
|
27
|
+
return !!filters_1.default.findKey(message, 'poll');
|
28
|
+
}
|
29
|
+
static isLiveLocation(message) {
|
30
|
+
return !!filters_1.default.findKey(message, 'live_location');
|
31
|
+
}
|
32
|
+
static isFile(message) {
|
33
|
+
return !!filters_1.default.findKey(message, 'file');
|
34
|
+
}
|
35
|
+
static isDelete(message) {
|
36
|
+
return !!filters_1.default.findKey(message, 'removed_message_id');
|
37
|
+
}
|
38
|
+
static kypadID(button_id) {
|
39
|
+
return (message) => {
|
40
|
+
const res = filters_1.default.findKey(message, 'button_id');
|
41
|
+
return res === button_id;
|
42
|
+
};
|
43
|
+
}
|
44
|
+
}
|
45
|
+
exports.default = BotFilters;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const exceptions_1 = require("../../../../exceptions");
|
4
|
+
async function builder(method, input = {}) {
|
5
|
+
if (!this.sendToken) {
|
6
|
+
throw new Error('[builder] Bot token is not set. Please provide a valid token.');
|
7
|
+
}
|
8
|
+
const response = await this.network.request(method, input);
|
9
|
+
if (response?.status === 'OK') {
|
10
|
+
return response.data;
|
11
|
+
}
|
12
|
+
const msg = `[builder] ${exceptions_1.MeaagesErrors[response?.status] || 'unknown error:'}`;
|
13
|
+
throw new exceptions_1.BuilderException(msg, response?.status, response);
|
14
|
+
}
|
15
|
+
exports.default = builder;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getMe = void 0;
|
7
|
+
const getMe_1 = __importDefault(require("./getMe"));
|
8
|
+
exports.getMe = getMe_1.default;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.getChat = void 0;
|
7
|
+
const getChat_1 = __importDefault(require("./getChat"));
|
8
|
+
exports.getChat = getChat_1.default;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.uploadFile = exports.requestSendFile = exports.getFile = void 0;
|
7
|
+
const getFile_1 = __importDefault(require("./getFile"));
|
8
|
+
exports.getFile = getFile_1.default;
|
9
|
+
const requestSendFile_1 = __importDefault(require("./requestSendFile"));
|
10
|
+
exports.requestSendFile = requestSendFile_1.default;
|
11
|
+
const uploadFile_1 = __importDefault(require("./uploadFile"));
|
12
|
+
exports.uploadFile = uploadFile_1.default;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
7
|
+
const undici_1 = require("undici");
|
8
|
+
const form_data_1 = __importDefault(require("form-data"));
|
9
|
+
async function uploadFile(url, fileName, filePath) {
|
10
|
+
if (!fs_1.default.existsSync(filePath)) {
|
11
|
+
console.error('[ uploadFile ] File not found at:', filePath);
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
const form = new form_data_1.default();
|
15
|
+
form.append('file', fs_1.default.createReadStream(filePath), {
|
16
|
+
contentType: 'application/octet-stream',
|
17
|
+
filename: fileName,
|
18
|
+
});
|
19
|
+
const res = await (0, undici_1.fetch)(url, {
|
20
|
+
method: 'POST',
|
21
|
+
body: form,
|
22
|
+
headers: form.getHeaders(),
|
23
|
+
dispatcher: this.network.agent,
|
24
|
+
});
|
25
|
+
if (!res.ok) {
|
26
|
+
const text = await res.text();
|
27
|
+
throw new Error(`HTTP ${res.status}: ${text}`);
|
28
|
+
}
|
29
|
+
const data = await res.json();
|
30
|
+
return data.data.file_id;
|
31
|
+
}
|
32
|
+
exports.default = uploadFile;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import Bot from '../bot';
|
2
|
+
import * as BotMethods from './bot';
|
3
|
+
import * as Advanced from './advanced';
|
4
|
+
import * as Utilities from './utilities';
|
5
|
+
import * as Files from './files';
|
6
|
+
import * as Messages from './messages';
|
7
|
+
import * as Chat from './chat';
|
8
|
+
import * as Settings from './settings';
|
9
|
+
import { SendMessage, Bot as BotType, Chat as ChatType } from '../types/models';
|
10
|
+
export default class Methods {
|
11
|
+
builder(this: Bot, ...args: Parameters<typeof Advanced.builder>): Promise<any>;
|
12
|
+
getMe(this: Bot, ...args: Parameters<typeof BotMethods.getMe>): Promise<BotType>;
|
13
|
+
getFile(this: Bot, ...args: Parameters<typeof Files.getFile>): Promise<any>;
|
14
|
+
requestSendFile(this: Bot, ...args: Parameters<typeof Files.requestSendFile>): Promise<{
|
15
|
+
upload_url: string;
|
16
|
+
}>;
|
17
|
+
uploadFile(this: Bot, ...args: Parameters<typeof Files.uploadFile>): Promise<any>;
|
18
|
+
sendMessage(this: Bot, ...args: Parameters<typeof Messages.sendMessage>): Promise<SendMessage>;
|
19
|
+
sendPoll(this: Bot, ...args: Parameters<typeof Messages.sendPoll>): Promise<SendMessage>;
|
20
|
+
sendLocation(this: Bot, ...args: Parameters<typeof Messages.sendLocation>): Promise<SendMessage>;
|
21
|
+
sendContact(this: Bot, ...args: Parameters<typeof Messages.sendContact>): Promise<SendMessage>;
|
22
|
+
forwardMessage(this: Bot, ...args: Parameters<typeof Messages.forwardMessage>): Promise<SendMessage>;
|
23
|
+
editMessageText(this: Bot, ...args: Parameters<typeof Messages.editMessageText>): Promise<SendMessage>;
|
24
|
+
deleteMessage(this: Bot, ...args: Parameters<typeof Messages.deleteMessage>): Promise<SendMessage>;
|
25
|
+
editMessageKeypad(this: Bot, ...args: Parameters<typeof Messages.editMessageKeypad>): Promise<SendMessage>;
|
26
|
+
editChatKeypad(this: Bot, ...args: Parameters<typeof Messages.editChatKeypad>): Promise<SendMessage>;
|
27
|
+
getChat(this: Bot, ...args: Parameters<typeof Chat.getChat>): Promise<ChatType>;
|
28
|
+
start(this: Bot, ...args: Parameters<typeof Utilities.start>): Promise<any>;
|
29
|
+
run(this: Bot, ...args: Parameters<typeof Utilities.run>): Promise<any>;
|
30
|
+
getUpdates(this: Bot, ...args: Parameters<typeof Utilities.getUpdates>): Promise<any>;
|
31
|
+
setupWebhook(this: Bot, ...args: Parameters<typeof Utilities.setupWebhook>): Promise<any>;
|
32
|
+
setCommands(this: Bot, ...args: Parameters<typeof Settings.setCommands>): Promise<any>;
|
33
|
+
updateBotEndpoints(this: Bot, ...args: Parameters<typeof Settings.updateBotEndpoints>): Promise<any>;
|
34
|
+
}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
19
|
+
var ownKeys = function(o) {
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
21
|
+
var ar = [];
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
23
|
+
return ar;
|
24
|
+
};
|
25
|
+
return ownKeys(o);
|
26
|
+
};
|
27
|
+
return function (mod) {
|
28
|
+
if (mod && mod.__esModule) return mod;
|
29
|
+
var result = {};
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
31
|
+
__setModuleDefault(result, mod);
|
32
|
+
return result;
|
33
|
+
};
|
34
|
+
})();
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
36
|
+
// types
|
37
|
+
const BotMethods = __importStar(require("./bot"));
|
38
|
+
const Advanced = __importStar(require("./advanced"));
|
39
|
+
const Utilities = __importStar(require("./utilities"));
|
40
|
+
const Files = __importStar(require("./files"));
|
41
|
+
const Messages = __importStar(require("./messages"));
|
42
|
+
const Chat = __importStar(require("./chat"));
|
43
|
+
const Settings = __importStar(require("./settings"));
|
44
|
+
class Methods {
|
45
|
+
// advanced
|
46
|
+
async builder(...args) {
|
47
|
+
return Advanced.builder.apply(this, args);
|
48
|
+
}
|
49
|
+
// bot
|
50
|
+
async getMe(...args) {
|
51
|
+
return BotMethods.getMe.apply(this, args);
|
52
|
+
}
|
53
|
+
// files
|
54
|
+
async getFile(...args) {
|
55
|
+
return Files.getFile.apply(this, args);
|
56
|
+
}
|
57
|
+
async requestSendFile(...args) {
|
58
|
+
return Files.requestSendFile.apply(this, args);
|
59
|
+
}
|
60
|
+
async uploadFile(...args) {
|
61
|
+
return Files.uploadFile.apply(this, args);
|
62
|
+
}
|
63
|
+
// messages
|
64
|
+
async sendMessage(...args) {
|
65
|
+
return Messages.sendMessage.apply(this, args);
|
66
|
+
}
|
67
|
+
async sendPoll(...args) {
|
68
|
+
return Messages.sendPoll.apply(this, args);
|
69
|
+
}
|
70
|
+
async sendLocation(...args) {
|
71
|
+
return Messages.sendLocation.apply(this, args);
|
72
|
+
}
|
73
|
+
async sendContact(...args) {
|
74
|
+
return Messages.sendContact.apply(this, args);
|
75
|
+
}
|
76
|
+
async forwardMessage(...args) {
|
77
|
+
return Messages.forwardMessage.apply(this, args);
|
78
|
+
}
|
79
|
+
async editMessageText(...args) {
|
80
|
+
return Messages.editMessageText.apply(this, args);
|
81
|
+
}
|
82
|
+
async deleteMessage(...args) {
|
83
|
+
return Messages.deleteMessage.apply(this, args);
|
84
|
+
}
|
85
|
+
async editMessageKeypad(...args) {
|
86
|
+
return Messages.editMessageKeypad.apply(this, args);
|
87
|
+
}
|
88
|
+
async editChatKeypad(...args) {
|
89
|
+
return Messages.editChatKeypad.apply(this, args);
|
90
|
+
}
|
91
|
+
// chat
|
92
|
+
async getChat(...args) {
|
93
|
+
return Chat.getChat.apply(this, args);
|
94
|
+
}
|
95
|
+
// utilities
|
96
|
+
async start(...args) {
|
97
|
+
return Utilities.start.apply(this, args);
|
98
|
+
}
|
99
|
+
async run(...args) {
|
100
|
+
return Utilities.run.apply(this, args);
|
101
|
+
}
|
102
|
+
async getUpdates(...args) {
|
103
|
+
return Utilities.getUpdates.apply(this, args);
|
104
|
+
}
|
105
|
+
async setupWebhook(...args) {
|
106
|
+
return Utilities.setupWebhook.apply(this, args);
|
107
|
+
}
|
108
|
+
// settings
|
109
|
+
async setCommands(...args) {
|
110
|
+
return Settings.setCommands.apply(this, args);
|
111
|
+
}
|
112
|
+
async updateBotEndpoints(...args) {
|
113
|
+
return Settings.updateBotEndpoints.apply(this, args);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
exports.default = Methods;
|