Closed
Conversation
Member
|
You need to separate this into multiple PRs. Also remove the TS stuff, I won't maintain it. Use the @types system instead. |
This was referenced Sep 16, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes and changes alot of the RPC functions as they have been (presumably) removed, or the API has changed (docs reference)
resolves #71
resolves #76
This is most definetly a semver: major change, version has been bumped to 4.0.0
This PR will be a draft for the time being, there are still some things that need tweaking slightly
A full list of changes
typescript^4.0.2as a dev-dependencyRPCClient#accessTokento non-enurmerableRPCClient#configas a private objectRPCClient#apiURLas a public getterRPCClient#cdnURLas a public getterRPCClient#fetchpathparameter has been changed to longer require a leading/RPCClient#connectRPCClient#requestcmdtocommandevttoeventRPCClient#_onRpcCloseto handle rpc closeRPCClient#_onRpcMessagemessageparameterRPCClient#_subscriptionsRPCClient#authorizeRPCClient#authorizeto be an async functionRPCClient#get*functions to be asyncgetChannel,getChannels,getGuild,getUserto use newChannel, andGuildstructures respectivelyGuildChannelUserUserFlagsClientApplicationRPCClient#setCertifiedDevicesRPCClient#setActivityRPCClient#clearActivityRPCClient#sendJoinInviteRPCClient#closeJoinRequestRPCClient#sendJoinRequestas it doesn't seem to be documented anymore - not sure on that so if someone could confirm thatRPCClient#setUserVoiceSettingsto use less linesRPCClient#select*to be async and use the newChannelstructureRPCClient#selectTextChannelno longer has aforceparameter, as its no longer effectedRPCClient#selectTextChannelno longer takes an object as its second parameterRPCClient#getVoiceSettingsandRPCClient#setVoiceSettingsuse a private function to resolve the data returned by the RPC APIRPCClient#captureShortcutRPCClient#setActivity(general refactor)RPCClient#createLobbyRPCClient#updateLobbyRPCClient#deleteLobbyRPCClient#connectToLobbyRPCClient#sendToLobbyRPCClient#disconnectFromLobbyRPCClient#getLobbyMemberRPCClient#getRelationshipsRPCClient#subscribeRPCClient#_subscriptionsand instead attaches an event listenerRPCEventon the clientunsubscrbibeRPCClient#destroyis no longer asyncAPI_BASE_URL,CDN_URL,UserFlags, andChannelTypesinto constantsLobbyTypesRelationshipTypesIPCTransportto emit an error on the client if it encounters an (what would've been) an unhandled promise rejectionnew Websocket(...)inWebSocketTransport, intellisense showed that it wasnt the correct type? can't test this due to whitelist-only featurerpc.js