This package has been deprecated
Author message:
This package is no longer supported, and neither is DiscordInjections.
di-interceptor
1.0.1 • Public • Published
Interceptor
Intercepts outgoing requests. (WebSocket & HTTP Requests)
Wiki
NOTE: This plugin does not intercept the main Discord websocket on startup.
Intercepting WebSocket creations
const interceptor = this.manager.get('Interceptor');
interceptor.on('websocket-intercepted', iee => {
if(iee.ws.url.includes("dealer.spotify.com")) this.spotifyWS = iee;
iee.on('data', this.spotifyData);
});
Intercepting HTTP requests
const interceptor = this.manager.get('Interceptor');
interceptor.on('request-open', (url, method, iee) => {
if(url.includes("spotify.com")) iee.on('data', this.handleSpotifyRequest);
});
Package Sidebar
Install
Weekly Downloads